Here is my code below :
User_Info.Add(!string.IsNullOrEmpty(Request.UserAgent) ? Request.UserAgent : string.Empty);//4:UserAgent
HttpBrowserCapabilities browser = Request.Browser;
User_Info.Add(!string.IsNullOrEmpty(browser.Browser) ? "Name : " + browser.Browser + " | " +
"Type : " + browser.Type + " | " +
"MajorVersion : " + browser.MajorVersion + " | " +
"MinorVersion : " + browser.MinorVersion : string.Empty);//5:UserBrowser
What is the difference between Request.UserAgent and Request.Browser?
I couldn’t understand those UserAgent strings!
Would you please show some examples with explanation?
Request.Browser is different from Request.UserAgent. UserAgent gets the raw user agent string of the client browser, and Request.Browser gets you the information about the browser capabilities. You wont get all the browser capabilities with the UserAgent string.