Search content within the blog

Wednesday, November 19, 2008

To Determine which version of .net are installed in clients system

Note : this works only in IE.

<script type="text/javascript" language="javascript">
function DetermineVersionsInstalled()
{
var a=navigator.userAgent.match(/\.NET CLR [0-9.]+/g);
if (a == null)
{
alert( ".NET Framework(s) is not installed" )
}
else
{
alert("The following versions of .NET Frameworks are installed:");
for(i = 0; i < a.length; ++i)
{
alert(a[i]);

}
}
return false;
}
</script>


<form id="form1" runat="server">
<div>
<asp:Button runat="server" ID="btnFindVersion" Text="Find Version" OnClientClick="Javascript:return DetermineVersionsInstalled();" />
</div>
</form>

No comments:

Post a Comment