locked
How to enable silverlight 3.0 in a simple asp.net application? RRS feed

  • Question

  • I have a simple ASP.NET 3.5 app in which I want to use SL 3.0 cntrols, how can I do that without starting out with a fresh SL enabled ASp.NET app aa template???

    Monday, April 19, 2010 3:55 PM

Answers

  • As i said, you will need a new sl solution with a reference to your existing control library. Then add the custom controls i.e. to your new sl solutions mainpage. You can now embed the generated xap into your existing asp.net page via object tag. Remember ur custom controls are still sl controls and not asp.net controls, which i know nothing about. 

    Tuesday, April 20, 2010 9:28 AM

All replies

  • I don't exactly understand what you mean! Just create a new sl project and add it to your existing page via the object tag. You could then access your DOM through the html bridge, if this is really what you wanna do!

    Monday, April 19, 2010 6:25 PM
  •  Yes, you'd need to create a Silverlight 3.0 application (the easiest way would be to add a new project to your existing solution), then in your ASP.NET's HTML, create a Silverlight <object /> tag to host your control.

    Here is an article on exactly how to do that:

    http://msdn.microsoft.com/en-us/library/cc189089%28VS.95%29.aspx

    Monday, April 19, 2010 6:39 PM
  • Clarification:

    I have a SL 3.0 controlLibrary & the controls I have defined in it are (say) : PreviousButton .

    I have my ASP.NET 3.5 application, and I need to use the Previous button control in it.

    How do I go about using the Previous button control in my current project??

    Tuesday, April 20, 2010 4:34 AM
  • As i said, you will need a new sl solution with a reference to your existing control library. Then add the custom controls i.e. to your new sl solutions mainpage. You can now embed the generated xap into your existing asp.net page via object tag. Remember ur custom controls are still sl controls and not asp.net controls, which i know nothing about. 

    Tuesday, April 20, 2010 9:28 AM