How to embed a SilverLight control in an ASP.NET control (custom or custom)

We have an ASP.NET web application written in VB.NET where we create content programmatically during an event Init

.

We make extensive use of custom controls, building them on the fly, and now I want to start including SilverLight content.

Is there an easy way to embed a SilverLight application into a control and then generate all of the code in code, just like you programmatically add regular ASP.NET elements to a page?

The SilverLight component itself works great when added to the page using a tag <object>

, but I really want it to be able to reuse it elsewhere in the code.

Since I anticipate using SilverLight to magnify in our application, and now the control is asp:Silverlight

now deprecated , I'm looking for an alternative way to wrap the content.

Thanks for any pointers.

+2


a source to share


1 answer


You can create your own version of the legacy Silverlight control - all it needs to do is fix the corresponding <object>

html at the time of the event Render

. It's a really straight forward 5 minute challenge to collapse one of them.



+2


a source







All Articles