E
Earl T
When I try to get the netscape version for version 7, I get the
HttpBrowserCapabilities class returning the version as 5 and not 7.
(see code and output below)
CODE
HttpBrowserCapabilities bc;
string s;
bc = Request.Browser;
....
s += "Type = " + bc.Type + "<br>" + "\n";
s += "Name = " + bc.Browser + "<br>" + "\n";
s += "Version = " + bc.Version + "<br>" + "\n";
s += "Major Version = " + bc.MajorVersion + "<br>" + "\n";
s += "Minor Version = " + bc.MinorVersion + "<br>" + "\n";
OUTPUT
Type = Netscape5
Name = Netscape
Version = 5.0
Major Version = 5
Minor Version = 0
When I use
s += Request.ServerVariables["http_user_agent"];
I get the output
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2)
Gecko/20030208 Netscape/7.02
which does contain the version 7.02 in the string.
Do I need to use the ServerVariables string to get the correct version
number or is there a better way???
Earl
HttpBrowserCapabilities class returning the version as 5 and not 7.
(see code and output below)
CODE
HttpBrowserCapabilities bc;
string s;
bc = Request.Browser;
....
s += "Type = " + bc.Type + "<br>" + "\n";
s += "Name = " + bc.Browser + "<br>" + "\n";
s += "Version = " + bc.Version + "<br>" + "\n";
s += "Major Version = " + bc.MajorVersion + "<br>" + "\n";
s += "Minor Version = " + bc.MinorVersion + "<br>" + "\n";
OUTPUT
Type = Netscape5
Name = Netscape
Version = 5.0
Major Version = 5
Minor Version = 0
When I use
s += Request.ServerVariables["http_user_agent"];
I get the output
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2)
Gecko/20030208 Netscape/7.02
which does contain the version 7.02 in the string.
Do I need to use the ServerVariables string to get the correct version
number or is there a better way???
Earl