We have a ASP.NET web application written in VB.NET where we build content programmatically during the Init
event.
We make extensive use of user controls, building them on the fly, and I now want to start including SilverLight content.
Is there an easy way of embedding a SilverLight application in a control, and then instantiating the whole thing in code, in the same way as you'd programmatically add ordinary ASP.NET controls to a page?
The SilverLight component itself works fine when added to a page using the <object>
tag but I really want to be able to reuse it elsewhere in code.
Since I'm expecting use of SilverLight to increase in our application, and the asp:Silverlight
control seems now to be deprecated, I'm looking for an alternative way of wrapping the content.
Thanks for any pointers.