Skip to main content
Home Forums Silverlight Programming Programming with .NET - General HOSTING SILVERLIGHT IN ANOTHER .ASPX PAGE
4 replies. Latest Post by paru on July 2, 2009.
(0)
KillStep
Member
33 points
96 Posts
06-29-2009 9:09 PM |
How can I have another .aspx page in my app that can host another Silverlight control?
For example - my page.xaml is hosted in a test page included in my app. I have another silverlight control that i want to be displayed but in another .aspx page in my app. How can this work?
koolraaga
99 points
20 Posts
06-29-2009 10:23 PM |
You can introduce another Page and embed in the Silverlight Control.
You can also have a Hyperlink or a TextBlock and call the HtmlPage.Navigate method from the System.Windows.Browser namespace
Roet
211 points
65 Posts
06-30-2009 4:37 AM |
You can add another Silverlight application project to your solution and then right click your web project, go to Silverlight applications and add the new Silverlight application to a specific output directory inside your webproject. Afther that, you can refer to it on the aspx page you want to show it on. If you have any questions, just ask.
nirav_20...
274 points
105 Posts
07-02-2009 4:30 AM |
I am not sure if you want to add same silverlight application xap in two different .aspx pages or different silverlight application xap in separate .aspx pages.
If you want to add same silverlight application page in two different pages:
Add two different .aspx pages and host <asp:silverlight> control in each of them. specify .xap file path as source property of the control.
You will be able to view same silverlight application in different pages without any problem.
If you want to add two different silverlight application in your web project and add them in two different .aspx pages,
Add two different silverlight applications in your web project. For both the silverlight applications set the .xap file path to ClientBin folder in your web application.
In aspx pages host silverlight control and set source property to point to relative .xap files in ClientBin folder of the web application.
This will work for you.
If you have different scenario than this, let me know.
Regards,
Nirav
paru
164 points
28 Posts
07-02-2009 5:16 AM |
If both the silverlight controls are in the same xap file then it can be done by java script :)