SharePoint and Silverlight when combined together provide a powerful platform for building Rich Internet Applications. The below article shows how to host Silverlight control dynamically in SharePoint 2007. This can be done in 3 different ways.
I was thinking, it sure would be nice to have something like ‘A Dynamic Silverlight loader web part with no configuration of anything (except for the Silverlight MIME types)’. The result – the LoadSL web part for SharePoint 2007.
The LoadSL web part for SharePoint allows you to add Silverlight to SharePoint, and all you need is the path to the XAP file, hight, width, and init params (if any).
In this method, the Silverlight application will be hosted in a ‘div’ element. This ‘div’ element is typically created in the CreateChildControls method of the web part.
No Configuration needed as like Method 1 above.
In this method, we are adding a ScriptManager and a Silverlight controls to our class. The only things we have to take care of are to ensure that there is only one instance of a ScriptManager in our current page (we do that with the call ScriptManager.GetCurrent(this.Page);)
Configuration needed for the Web.Config file of the Web application.
And that’s all, see how simple is now to host silverlight applications in our sharepoint server using any of the above 3 methods.