Zero to Hero: How to Check if Silverlight is installed.
Technorati Tags: Silverlight
del.icio.us Tags: Silverlight
I've been getting lots of questions on how to check to see if Silverlight is already installed. This is actually very easy to do, but has somehow slipped through the cracks (I even missed it when writing my Silverlight book -- DOH!) -- anyway -- the Silverlight.js library offers how to do this as well as lots of other goodies.
First, you can check to see if Silverlight is installed by looking at the
Silverlight.available
variable. Simple, huh? This will return true is Silverlight is installed and false if not.
While you're doing that, you may also want to see what browser and OS you are currently running.
The Browser is checked using this JavaScript var:
Silverlight.ua.Browser
which will return one of the following values: 'MSIE', 'Firefox', 'Safari' or 'Unsupported'.
The Operating System is checked using this JavaScript var:
Silverlight.ua.OS
which will return one of the following values: 'Windows', 'MacPPC', 'MacIntel', 'Unsupported'
So, using these values, you can make your installation experience as flexible as possible :)
Also, don't forget about the inplaceInstallPrompt property on the control itself.
Comments
Anonymous
October 24, 2007
PingBack from http://blogs.msdn.com/webnext/archive/2007/10/25/zero-to-hero-how-to-check-if-silverlight-is-installed.aspxAnonymous
October 24, 2007
Technorati Tags: Silverlight del.icio.us Tags: Silverlight I've been getting lots of questions onAnonymous
October 24, 2007
Silverlight.js库提供了如何检查是否已安装Silverlight的方法。Silverligh.available可以检测Silverlight是否被安装,这个方法会返回true或者fa...Anonymous
October 25, 2007
The comment has been removed