Identify Browser type and version in ASP

This reports IE 10 as IE 7
var bc = Server.CreateObject("MSWC.BrowserType");

Anyone have a way to detect IE 10 using ASP?

I'd rather not jump through the hoops to  try  cyScape.BrowserObj.  
Also unknown if that's going to work on Win 2008 server .

Thanks
awalkintheparkAsked:
Who is Participating?
 
baller119Connect With a Mentor Commented:
The portion of the string that indicates IE10 in your example is "Trident/6.0" - that is unique to IE10.
0
 
Lee W, MVPTechnology and Business Process AdvisorCommented:
I'm guessing ServerVariables doesn't work for you?
0
 
baller119Commented:
Have you already tried parsing the Request.ServerVariables("HTTP_USER_AGENT") variable?
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
awalkintheparkAuthor Commented:
Right, when using  windows 7 and  IE 10
Request.ServerVariables("HTTP_USER_AGENT")  returns:

Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/6.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)
0
 
baller119Commented:
Is compatibility mode enabled in IE10?
0
 
awalkintheparkAuthor Commented:
That's the point. I want to detect if it's IE 10 , and if so, put a message up to the users
to toggle compatibility mode.
0
 
Dave BaldwinFixer of ProblemsCommented:
Here's a list of IE User Agent strings: http://www.useragentstring.com/pages/Internet%20Explorer/  I'm sure it's not complete but it's something to work with.
0
 
awalkintheparkAuthor Commented:
Nice.
"Trident/6.0"  so  obvious!

Thanks.
And for anyone else needing it:

var str= new String(Request.ServerVariables("HTTP_USER_AGENT"));
var IE10Flag = str.indexOf("Trident/6.0");

Followed by :

if (IE10Flag>0) {
//do something
}
0
 
awalkintheparkAuthor Commented:
according to that link,
there are  IE 10  strings without Trident 6.0
but they have "MSIE 10.0"  so I guess check for either

Sorry closed  it before seeing that so can't give you points
0
 
Dave BaldwinFixer of ProblemsCommented:
Everybody is telling me that today...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.