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: