using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; namespace DSWeb.Filter { /// /// 获取当前用户的浏览器版本主要支持(FF,IE6,IE7,IE8,Chrome) /// public class LeftTreeCssFilter { #region Private Member private string _browserVersion = ""; //浏览器版本 private string _browserName = "";//浏览器名称 private HttpRequest filterRequest; #endregion public LeftTreeCssFilter() { } /// /// 构造函数获取HttpRequest Object /// /// public LeftTreeCssFilter(HttpRequest request) { filterRequest = request; if(filterRequest != null) { _browserVersion = request.Browser.Version; _browserName = request.Browser.Browser; } } #region 读写属性 /// /// 获取当前浏览器版本 /// public string Version { get { return _browserVersion; } set { _browserVersion = value; } } /// /// 获取当前浏览器名称 /// public string BrowserName { get { return _browserName; } set { _browserName = value; } } #endregion } }