none
How do you know if the Silverlight plugin is installed on a computer??

    Question

  • 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

    Friday, October 30, 2009 7:42 AM

Answers

  • 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>

    Friday, October 30, 2009 8:02 AM
  • Friday, October 30, 2009 8:13 AM
  • This should do it, only a few lines of code

    http://www.dotnetspider.com/tutorials/Silverlight-Tutorial-327.aspx

    Wednesday, November 04, 2009 9:38 AM

All replies

  • 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>

    Friday, October 30, 2009 8:02 AM
  • Friday, October 30, 2009 8:13 AM
  • This should do it, only a few lines of code

    http://www.dotnetspider.com/tutorials/Silverlight-Tutorial-327.aspx

    Wednesday, November 04, 2009 9:38 AM
  • One thing you can also easily do is check in Internet Explorer to see
    if Silverlight is installed:

    Tools
    '->Managed add-on

    If Silverlight is installed then it should be displayed under

    Name                           Publisher                     Status           Version 
    ------------------------------------------------------------------------------------------------------
    Microsoft Corporation
    Microsoft 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 code
    it 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.

    Wednesday, November 04, 2009 11:40 AM