Patrick
Patrick

Reputation: 2781

Detect Internet Explorer 9 in MVC

I'm trying to detect from server-side in an MVC4 Website the Internet Explorer 9, but Request.Browser.Browser returns Mozilla and Request.Browser.MajorVersion returns 0.

Any idea how can I achieve this?

Thanks.

Upvotes: 0

Views: 2278

Answers (2)

Neil Kilbride
Neil Kilbride

Reputation: 144

 Request.Browser 

You have all sorts of browser data available on this object, see this Browser Capabilities MSDN page for more details.

Upvotes: 0

John H
John H

Reputation: 14655

Try this:

if (Request.UserAgent.Contains("MSIE 9.0"))
{

}

Upvotes: 2

Related Questions