Skip to main content

Microsoft Silverlight

Answered Question HOSTING SILVERLIGHT IN ANOTHER .ASPX PAGERSS Feed

(0)

KillStep
KillStep

Member

Member

33 points

93 Posts

HOSTING SILVERLIGHT IN ANOTHER .ASPX PAGE

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
koolraaga

Member

Member

98 points

20 Posts

Re: HOSTING SILVERLIGHT IN ANOTHER .ASPX PAGE

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

Hope this helps

 

Roet
Roet

Member

Member

211 points

65 Posts

Re: HOSTING SILVERLIGHT IN ANOTHER .ASPX PAGE

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.

If this post helped you, please mark it as answer! It helps other people too.

nirav_2052003
nirav_20...

Member

Member

274 points

105 Posts

Answered Question

Re: HOSTING SILVERLIGHT IN ANOTHER .ASPX PAGE

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
paru

Member

Member

164 points

28 Posts

Re: HOSTING SILVERLIGHT IN ANOTHER .ASPX PAGE

If both the silverlight controls are in the same xap file then it can be done by java script :)

Thanks
Paru

--mark as answer if helped
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities