Okey, I am using this code to detect the browser
<%= Request.Browser.Browser %>
When using chrome, it is giving me browser
AppleMAC-Safari
I need it to say chrome, Ater looking around, i found this
Google Chrome/Safari Same Browser Name and Version !
I did all that was given in the answer to the question, but that doesn't help.
I am using VS 2010 and using .net framework 3.5
thankyou.
Edit: I tried doing what is suggested on this page
http://www.codemonkeez.com/2010/06/detect-google-chrome-browser-with.html
it is still giving me
AppleMAC-Safari
:/
thanks again.
Have you tried:
if (Request.UserAgent.Contains("Chrome") && !Request.UserAgent.Contains("Edge"))
{
//do chrome stuff
}
Use <%= Request.UserAgent %>
which will give you something like this:
Mozilla/5.0 (Windows NT 6.1) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.68 Safari/534.24
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With