An error occurred while embedding the Silverlight control into the ASP. NET webpage.

Source: Internet
Author: User

Create a Silverlight Control Project. During debugging, default.html is automatically generated in Bin/debugto test the Silverlight control.

Sometimes you need to add the control project to an existing webapplication or website project. Take ASP. Net 3.5 extensions web application as an example to add a reference to the Silverlight project:

 

After joining, it looks like:

 

In this case, a clientbin directory will be added to the project (only the silverlightrctest. xap is required to embed the Silverlight control. It is a compressed package containing two files: appmanifest. XAML, silverlightrctest. dll) and two test files:

Silverlightrctesttestpage. aspx, embedded using the Silverlight Control

Silverlightrctesttestpage.html, embedded using JavaScript

Unfortunately, an error occurs when you run silverlightrctesttestpage. aspx:

Delete the following code from silverlightrctesttestpage. aspx:

<% @ Register Assembly = "system. Web. Silverlight" namespace = "system. Web. UI. silverlightcontrols"

Tagprefix = "asp" %>

Remove and reference system. Web. Silverlight from references:

After a rebuild, the operation is OK.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.