- 1). Open the HTML document that corresponds to the page you wish to add Silverlight to. Depending on the web hosting service you use, you may be able to access this page within your user control panel. Alternatively, you can edit the HTML document within your preferred WYSIWYG editor.
- 2). Paste the following HTML code into your website's HTML document:
<object
data="data:application/x-silverlight-2,"
type="application/x-silverlight-2" >
<param name="source" value="SilverlightApplication1.xap"/>
</object> - 3). Insert the following code after the code from step 2. This code will display an alternate message in the instance that a user does not have Silverlight installed.
<object
data="data:application/x-silverlight-2,"
type="application/x-silverlight-2" >
<param name="source" value="SilverlightApplication1.xap"/>
<!-- Display installation image. -->
<a href="/links/?u=http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50401.0"
style="text-decoration: none;">
<img src="http://go.microsoft.com/fwlink/?LinkId=161376"
alt="Get Microsoft Silverlight"
style="border-style: none"/>
</a>
</object> - 4). Save the changes to the HTML document. Refresh the website within your internet browser to confirm that the Silverlight object has been added in correctly.
SHARE