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.