You can use the following JavaScript code in a web page to determine which versions of .NET are installed on a client PC:

<script language="JavaScript" type="text/javascript">
var a = navigator.userAgent.match(/\.NET CLR [0-9.]+/g);
if (a == null)
document.write( "Microsoft .NET is not installed on your PC" )
else
{
document.write( "The following versions of Microsoft .NET are installed on your PC:<br/>" )
for (i = 0; i < a.length; ++i)
{
document.write( a[i] )
document.write( "<br/>" )
}
}
</script>

Here is the code in action:

Popularity: 12% [?]

Related posts:

  1. Determine the .NET Versions on which an Application is Compiled and Running
  2. .NET Installed on Almost 80% of Windows PCs
  3. Read a Web Page in C#
  4. Determine if a Loaded .NET Assembly is Signed
  5. Determine the Version of a Loaded .NET Assembly