14.8. Adding Silverlight to Your Application

So back to the Hi yo Silver application. How did this end up being rendered in the browser? In Silverlight 3.0, applications are displayed using the <object> tag. Previous versions of Silverlight utilized an ASP.NET Silverlight tag that has since been deprecated (although still available on CodePlex).

14.8.1. Object Tag

Select the Chapter14.HelloSilverlight.Web project, and open the file ~/Chapter14.HelloSilverlightTestPage.html. The page will contain an <object> tag similar to the following:

<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%"> <param name="source" value="ClientBin/Chapter14.HelloSilverlight.xap"/> <param name="onError" value="onSilverlightError" ...

Get Introducing .NET 4.0: with Visual Studio 2010 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.