Skip to main content
Home Forums General Silverlight Getting Started How do you know if the Silverlight plugin is installed on a computer??
4 replies. Latest Post by MawashiKid on November 4, 2009.
(0)
edoust
Member
0 points
1 Posts
10-30-2009 7:42 AM |
Okay, stupid question but I haven't found out anything about this:How do you know if Silverlight is actually installed on a computer which tries to display your Silverlight app? If Silverlight is not installed yet, how can you show an error page / download link?
Thanks
bharathk...
280 points
51 Posts
10-30-2009 8:02 AM |
Hi edoust,
<form id="form1" runat="server" style="height:100%"> <div id="silverlightControlHost"> <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%"> <param name="source" value="ClientBin/SilverlightApplication1.xap"/> <param name="onError" value="onSilverlightError" /> <param name="background" value="white" /> <param name="minRuntimeVersion" value="3.0.40624.0" /> <param name="autoUpgrade" value="true" /> <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=3.0.40624.0" style="text-decoration:none"> <img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style:none"/> </a> </object><iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe></div> </form>
rabbott
258 points
37 Posts
10-30-2009 8:13 AM |
Try this thread: http://forums.silverlight.net/forums/p/121391/276826.aspx
Regards,Rob
nt86
19 points
9 Posts
11-04-2009 9:38 AM |
This should do it, only a few lines of code
http://www.dotnetspider.com/tutorials/Silverlight-Tutorial-327.aspx
MawashiKid
572 points
105 Posts
11-04-2009 11:40 AM |
One thing you can also easily do is check in Internet Explorer to seeif Silverlight is installed:
Tools'->Managed add-on
If Silverlight is installed then it should be displayed under
Name Publisher Status Version ------------------------------------------------------------------------------------------------------Microsoft CorporationMicrosoft Silverlight Microsoft Corporation Enabled 3.0.40818.0 <------
Now a simple test you can do is simply change the Status to Disabled...Then reload the same page in your browser to see what's happening...Basically, your browser won't be able to recognize any Silverlight code...So what will it do? Simply skip the SLV code part and jump to the next line of codeit can recognize and is able to render...By default you should end up with a Silverlight logo on the top left of your screen... But of course you're free to make any other modification you want...-add a gentle notice to the user that it's time to upgrade, FREE BEER ON LINE!!!! :) -redirect them to Silverlight.net ... -at the most... even add a "good old sniffer" function to check if Javascript is enabled on the client's browser... etc... etc... etc...
If this answers your question please click Mark as an answer, Thank you.