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 { /// <summary> /// 获取当前用户的浏览器版本主要支持(FF,IE6,IE7,IE8,Chrome) /// </summary> public class LeftTreeCssFilter { #region Private Member private string _browserVersion = ""; //浏览器版本 private string _browserName = "";//浏览器名称 private HttpRequest filterRequest; #endregion public LeftTreeCssFilter() { } /// <summary> /// 构造函数获取HttpRequest Object /// </summary> /// <param name="request"></param> public LeftTreeCssFilter(HttpRequest request) { filterRequest = request; if(filterRequest != null) { _browserVersion = request.Browser.Version; _browserName = request.Browser.Browser; } } #region 读写属性 /// <summary> /// 获取当前浏览器版本 /// </summary> public string Version { get { return _browserVersion; } set { _browserVersion = value; } } /// <summary> /// 获取当前浏览器名称 /// </summary> public string BrowserName { get { return _browserName; } set { _browserName = value; } } #endregion } }