asp.net - Detecting a browser type -


togeather error reporting in asp.net app, retreiving browser information. example getting specific error lot:

type = mozilla name = mozilla version = 5.0 major version = 5 minor version = 0 platform = unknown beta = false crawler = false aol = false win16 = false win32 = false supports frames = false supports tables = false supports cookies = false supports vbscript = false supports javascript = false 0.0 supports java applets = false supports activex controls = false 

my first idea firefox, aslo firefox in erros, not sure exact browser information above?

thanks

try below  response.write(request.servervariables("http_user_agent"))  

// getting browser name of visitor

if (request.servervariables["http_user_agent"].contains("msie"))   browser = "internet explorer"; if (request.servervariables["http_user_agent"].contains("firefox"))   browser = "fire fox"; if (request.servervariables["http_user_agent"].contains("opera"))   browser = "opera"; 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -