2

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.

4

1 に答える 1

2

非推奨のSilverlightコントロールの独自のバージョンを作成できます。必要なのは、イベント<object>中に適切なhtmlを発行することだけです。Renderこれは、これらの1つをロールアップするための非常に簡単な5分間のタスクです。

于 2010-04-29T07:57:15.587 に答える