Duration: 17 minutes
Summary: In this video we arediscussing how we can load a Silverlight application within our ASP.NET page. We start by adding a Silverlight application to the current project. While we are doing that we ask to have the application hosted by the current web site. We do this so we can have the website include a copy of the xap file in the ClientBin folder. So when we change the Silverlight application, our changes will be reflected on the web page. When we create the application, we add a label control to the main page and change some of its properties (content, background, opacity…). Once we are done with the Silverlight changes, we create an ASP.NET page in the web site. In that page, we add an object tag. We change some of the properties for the tag (id, width, height, data, type). We also add two params (parameters): one for the background, and one for the source to specify where the xap file is. This last property is important to get it right (otherwise, the application will not load). Finally, we load the page to see that the Silverlight control is loaded in a part of the page (300*300 in size).
Methodology of the development of example: Good coding standard and simplified design to illustrate the key points.
Technology Used: ASP.NET and Visual Studio 2010, Silverlight, Label, Control, Object, param, Opacity.Keyword: ASP.NET 4, Visual Studio 2010.