开发者

Can I use the silverlight server control inside an asp.net mvc 2 page?

开发者 https://www.devze.com 2023-02-19 21:33 出处:网络
I can\'t find开发者_运维问答 it when typing <asp: With MVC you don\'t use webform controls.<asp:...> are tags used by webform controls.Silverlight doesn\'t require a webform control to work an

I can't find开发者_运维问答 it when typing

<asp:


With MVC you don't use webform controls. <asp:...> are tags used by webform controls. Silverlight doesn't require a webform control to work anyways, you just need to add the following HTML to your view:

<object id="objYourSilverlightControl" data="data:application/x-silverlight-2,"
    type="application/x-silverlight-2" width="500px" height="500px">
    <param name="source" value="../ClientBin/youSilverlightControl.xap"/>
    <param name="onError" value="onSilverlightError" />
    <param name="background" value="white" />
    <param name="minRuntimeVersion" value="3.0.40624.0" />
    <param name="autoUpgrade" value="true" />
    <param name="windowless" value="true" />
    <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=3.0.40624.0"
        style="text-decoration:none">
        <img src="http://go.microsoft.com/fwlink/?LinkId=108181"
            alt="Get Microsoft Silverlight" style="border-style:none"/>
    </a>
</object>

I think the webform control that you are referring is no longer supported anyways (it might be still but I have never needed to use it).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号