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("<p>浏览器属性:</p>");
Response.Write("浏览器型号 = " +
bc.Type + "<br/>");
Response.Write("浏览器名称 = "
+ bc.Browser + "<br/>");
Response.Write("浏览器版本 = " +
bc.Version + "<br/>");
Response.Write("主版本号 = " +
bc.MajorVersion + "<br/>");
Response.Write("从版本号 = " +
bc.MinorVersion + "<br/>");
Response.Write("操作系统 = " +
bc.Platform + "<br/>");
Response.Write("是否试用版 = " +
bc.Beta + "<br/>");
Response.Write("Is Crawler = " +
bc.Crawler + "<br/>");
Response.Write("Is AOL = " + bc.AOL
+ "<br/>");
Response.Write("16位机 = " +
bc.Win16 + "<br/>");
Response.Write("32位机 = " +
bc.Win32 + "<br/>");
Response.Write("支持Frame = " +
bc.Frames + "<br/>");
Response.Write("支持Table = " +
bc.Tables + "<br/>");
Response.Write("支持Cookies = " +
bc.Cookies + "<br/>");
Response.Write("支持vb Script = " +
bc.VBScript + "<br/>");
Response.Write("支持 javaScript = "
+ bc.JavaScript + "<br/>");
Response.Write("支持 Java Applets =
" + bc.JavaApplets + "<br/>");
Response.Write("支持 ActiveX
Controls = " + bc.ActiveXControls + "<br/>");
Response.Write("电台CDF = " +
bc.CDF + "<br/>");
Response.Write(Request.UserAgent);
Response.Write ("<script
language='javascript'>//读屏幕的大小screenWidth=screen.widt
h;screenHeight=screen.height;</script>");
//屏幕分辨率的高:Response.Write
(window.screen.height);
//屏幕分辨率的宽:"+
window.screen.width;
//屏幕可用工作区高度:"+
window.screen.availHeight;
//屏幕可用工作区宽度:"+
window.screen.availWidth
关键词标签:ASP.NET,IE浏览器
相关阅读
热门文章 手把手教你用好LINQ to SQL在.NET环境下为网站增加IP过滤功能ASP.NET 如何避免页面重新整理时重复送出用Asp.net扩展ExtJS
人气排行 asp.net表单提交方法GET\POST在ASP.NET中如何判断用户IE浏览器的版本Asp.net中messagebox的实现方法Asp.net中的web.config配置在ASP.NET MVC中实现大文件异步上传用Iformattable接口控制.Net中文本格式c#.Net经典面试题目用Asp.net扩展ExtJS
查看所有0条评论>>