Quite a few people have asked me how to detect which .NET Framework version is running on their Web Hosting Server. It's actuelly quite easy.
You can get the current .NET version using System.Environment.Version.ToString(); - this will return the version number of the ASP.NET assembly in the Global Assembly Cache.