使用.NET 3.5和C#检测铬 [英] Detecting Chrome using .net 3.5 and C#
问题描述
欧凯,我用这code来检测浏览器
Okey, I am using this code to detect the browser
<%= Request.Browser.Browser %>
在使用Chrome,它给我的浏览器
When using chrome, it is giving me browser
AppleMAC-Safari浏览器
AppleMAC-Safari
我需要它说的铬,亚特环顾四周,我发现这个
I need it to say chrome, Ater looking around, i found this
<一个href=\"http://stackoverflow.com/questions/3633843/google-chrome-safari-same-browser-name-and-version\">Google铬/ Safari浏览器相同的浏览器的名称和版本!!!!!!
我做过的一切是在问题的答案给出,但这并不能帮助。
I did all that was given in the answer to the question, but that doesn't help.
我使用VS 2010和使用.NET Framework 3.5
I am using VS 2010 and using .net framework 3.5
三江源。
编辑:我试图做什么,建议在此页面上
I tried doing what is suggested on this page
<一个href=\"http://www.$c$cmonkeez.com/2010/06/detect-google-chrome-browser-with.html\">http://www.$c$cmonkeez.com/2010/06/detect-google-chrome-browser-with.html
它仍然给我
AppleMAC-Safari浏览器
AppleMAC-Safari
:/
再次感谢。
推荐答案
你试过:
if (Request.UserAgent.Contains("Chrome"))
{
//do chrome stuff
}
这篇关于使用.NET 3.5和C#检测铬的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!