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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.