I am trying to do a "If browser is IE and is less than version 9" in ASP.Net C# codebehind.
However, In chrome, the following line:
if (Request.Browser.Browser == "IE" && Request.Browser.MajorVersion < 9)
Outputs as "IE" & 5 respectively. Despite using Chrome v18.
What is the correct usage for getting the users browser? Or is this just my version of Chrome playing up? It's probably really simple, but I'm sure this code worked previously
The user agent is registering as:
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19