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 .

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.
Lee W, MVPTechnology and Business Process AdvisorCommented:
I'm guessing ServerVariables doesn't work for you?
Have you already tried parsing the Request.ServerVariables("HTTP_USER_AGENT") variable?
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)
Is compatibility mode enabled in IE10?
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.
Dave BaldwinFixer of ProblemsCommented:
Here's a list of IE User Agent strings:  I'm sure it's not complete but it's something to work with.
awalkintheparkAuthor Commented:
"Trident/6.0"  so  obvious!

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
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
Dave BaldwinFixer of ProblemsCommented:
Everybody is telling me that today...
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.