Skip to main content
Home Forums Silverlight Programming Programming with .NET - General is there a quick and easy to get the SL plugin's version number in C#?
3 replies. Latest Post by nerdabilly on January 2, 2009.
(0)
nerdabilly
Member
6 points
10 Posts
01-02-2009 12:28 PM |
I'm writing a Silverlight class library in C#. one of its features will be to make an http request, and one of the requirements is that it passes a version # in the HTTP request. I'd like to know if there's a built-in function or property that will get the client's Silverlight plugin version #. In Flash, there is a built-in function called "getVersion()" which will just return the client's Flash Player version # as a string . Is there a similar thing in Silverlight? Thanks!
theomed
28 points
9 Posts
01-02-2009 12:49 PM |
Use this.
var plugin = navigator.plugins["Silverlight Plug-In"] ;
var
versionNumber should give you somoething like 1.0.30226.2 or 2.0.30226.2 depending on the version number you have. Let me know if this solves the problem for you.
Mark it as answered if it does.
01-02-2009 12:50 PM |
versionNumber should return a string for you.
01-02-2009 12:52 PM |
Then I must be doing something wrong.
I'm using visual Web Developer with the SL tools trying to create a class library (DLL).
when I use versionNumber I get an error:
Error 2 The name 'versionNumber' does not exist in the current context
theomed's solution won't work because it's JavaScript, I'm writing in C# to create a redistributable library.
Thanks!