简体   繁体   中英

How to add Silverlight app to my web page?

I have created a website. How do I add my Silverlight application to it?

To add your silverlight application to your page using html, follow the steps outlined here . With a quick google search you can find how to embed silverlight in asp, asp.net, etc...

Visual Studio automatically generates this code within html page that embeds silverlight app

<div id="silverlightControlHost">
    <object data="data:application/x-silverlight," type="application/x-silverlight-2" width="100%" height="100%">
        <param name="source" value="SilverlightApplication1.xap"/>
        <param name="onerror" value="onSilverlightError" />
        <param name="background" value="white" />
        <param name="minRuntimeVersion" value="2.0.31005.0" />
        <param name="autoUpgrade" value="true" />
        <a href="http://go.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;">
            <img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none"/>
        </a>
    </object>
    <iframe style='visibility:hidden;height:0;width:0;border:0px'></iframe>
</div>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM