获取浏览器版本型号(C#)

private string GetClientBrowserVersions()
{
string browserVersions = string.Empty;
HttpBrowserCapabilities hbc = HttpContext.Current.Request.Browser;
string browserType = hbc.Browser.ToString(); //获取浏览器类型
string browserVersion = hbc.Version.ToString(); //获取版本号
browserVersions = browserType + browserVersion;
return browserVersions;
}

posted @ 2015-07-09 16:04  Coding_Yong  阅读(1777)  评论(0编辑  收藏  举报