Silverlight Check

6/30/2009 8:30:26 AM

I have recently been shipped up to Wellington to do some Silverlight work for a Microsoft presentation. I have worked with Silverlight a little in practice, but never in a professional environment.

One of my first tasks was to make sure that the user that is coming to our Webiste has silverlight installed. It took a little bit of hunting around to find this so I thought I would share.

When creating a Silverlight project in the default project you will get a Silverlight.js file. If that file is not present you can Add New Item > Silverlight.js. Next, all you have to do is add:
Silverlight Check

Now your Website will detect if the user is using Silverlight. If they are not they will be directed to Microsoft where they can aquire it.