Reputation: 9959
is there any way of checking with an ASP.NET webpage if the client pc has the NET framework 2.0 installed?
Upvotes: 1
Views: 263
Reputation: 585
string version = Request.Browser.ClrVersion.ToString();
This I think will reveal the clr version. If this is not enough, you would need an object downloaded to the client to investigate the clients computer.
Upvotes: 2
Reputation: 5532
You can use Server Variables located in the HttpRequest object to check to see if the framework is installed. The frame work version is in the HTTP_USER_AGENT and would look something like this:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Upvotes: 4