在ASP.NET中如何判断用户IE浏览器的版本
1个回答
展开全部
if ( Request.Browser.MajorVersion == 6 ) { // to do } ...................................................................................................................................... private void Page_Load(object sender, System.EventArgs e) { HttpBrowserCapabilities bc = new HttpBrowserCapabilities(); bc = Request.Browser; Label1.text=bc.Platform + " 你的浏览器:" + bc.Type; } ...................................................................................................................................... HttpBrowserCapabilities bc = Request.Browser; Response.Write("
浏览器属性:"); Response.Write("浏览器型号 = " + bc.Type + ""); Response.Write("浏览器名称 = " + bc.Browser + ""); Response.Write("浏览器版本 = " + bc.Version + ""); Response.Write("主版本号 = " + bc.MajorVersion + "掘滚悔"); Response.Write("从版本号 = " + bc.MinorVersion + ""); Response.Write("操备兄作系统 = " + bc.Platform + ""); Response.Write("是否试用版 = " + bc.Beta + ""); Response.Write("Is Crawler = " + bc.Crawler + ""); Response.Write("Is AOL = " + bc.AOL + ""); Response.Write("16位机 = " + bc.Win16 + "判正"); Response.Write("32位机 = " + bc.Win32 + ""); Response.Write("支持Frame = " + bc.Frames + ""); Response.Write("支持Table = " + bc.Tables + ""); Response.Write("支持Cookies = " + bc.Cookies + ""); Response.Write("支持VB Script = " + bc.VBScript + ""); Response.Write("支持 JavaScript = " + bc.JavaScript + ""); Response.Write("支持 Java Applets = " + bc.JavaApplets + ""); Response.Write("支持 ActiveX Controls = " + bc.ActiveXControls + ""); Response.Write("电台CDF = " + bc.CDF + ""); Response.Write(Request.UserAgent); Response.Write ("//读屏幕的大小screenWidth=screen.widt h;screenHeight=screen.height;"); //屏幕分辨率的高:Response.Write (window.screen.height); //屏幕分辨率的宽:"+ window.screen.width; //屏幕可用工作区高度:"+ window.screen.availHeight; //屏幕可用工作区宽度:"+ window.screen.availWidth
浏览器属性:"); Response.Write("浏览器型号 = " + bc.Type + ""); Response.Write("浏览器名称 = " + bc.Browser + ""); Response.Write("浏览器版本 = " + bc.Version + ""); Response.Write("主版本号 = " + bc.MajorVersion + "掘滚悔"); Response.Write("从版本号 = " + bc.MinorVersion + ""); Response.Write("操备兄作系统 = " + bc.Platform + ""); Response.Write("是否试用版 = " + bc.Beta + ""); Response.Write("Is Crawler = " + bc.Crawler + ""); Response.Write("Is AOL = " + bc.AOL + ""); Response.Write("16位机 = " + bc.Win16 + "判正"); Response.Write("32位机 = " + bc.Win32 + ""); Response.Write("支持Frame = " + bc.Frames + ""); Response.Write("支持Table = " + bc.Tables + ""); Response.Write("支持Cookies = " + bc.Cookies + ""); Response.Write("支持VB Script = " + bc.VBScript + ""); Response.Write("支持 JavaScript = " + bc.JavaScript + ""); Response.Write("支持 Java Applets = " + bc.JavaApplets + ""); Response.Write("支持 ActiveX Controls = " + bc.ActiveXControls + ""); Response.Write("电台CDF = " + bc.CDF + ""); Response.Write(Request.UserAgent); Response.Write ("//读屏幕的大小screenWidth=screen.widt h;screenHeight=screen.height;"); //屏幕分辨率的高:Response.Write (window.screen.height); //屏幕分辨率的宽:"+ window.screen.width; //屏幕可用工作区高度:"+ window.screen.availHeight; //屏幕可用工作区宽度:"+ window.screen.availWidth
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询