views:

369

answers:

3

How do I use a XAP file created in Silverlight in my ASP.NET application?? I mean what are all the registration and changes to be done in the pages in order for the Silverlight content to be displayed in my aspx page?

A: 

you will need an aspx page that references your XAP file

Konstantinos
+2  A: 

Use the Silverlight ASP.NET control on your page and reference your .xap which should be in your ClientBin folder.

<asp:Silverlight ID="Silverlight1" runat="server" 
Source="../ClientBin/Something.xap" MinimumVersion="2.0" 
Width="100%" Height="100%" />
Brendan Enrick
A: 

If you create a new Silverlight application in Visual Studio, one of the options while creating the project is to have Visual Studio create an ASP.NET project that displays your Silverlight app. You could probably start with that code, and then integrate it into your application.

Andy
how to integrate that?
If you look at the code of the generated ASP.NET application, it contains the tag used to display the Silverlight app. Just copy/paste that into your app instead.
Andy