日期:2014-04-25 浏览次数:22751 次
protected void Page_Load(object sender, EventArgs e)
{
HttpBrowserCapabilities b = Request.Browser;//采用HttpBrowserCapabilities的反应出来
Response.Write("客户端浏览器信息!");
Response.Write("类型" + b.Type+"<br>");
Response.Write("名称" + b.Browser+"<br>");
Response.Write("版本" + b.Version+"<br>");
Response.Write("操作平台" + b.Platform+"<br>");
Response.Write("能否支持框架" + b.Frames+"<br>");
Response.Write("能否支持表格" + b.Tables+"<br>");
Response.Write("能否支持Cookies:" + b.Cookies+"<br>");
Response.Write("" +"<hr>");
Response.Write("客户端其它信息");
Response.Write("" +"<hr>");
Response.Write("客户端主机名称" +Request.UserHostName+"<br>");
Response.Write("客户端主机IP" + Request.UserHostAddress+"<br>");
Response.Write("指定页面路径" + Request.MapPath("Default.aspx")+"<br>");
Response.Write("原始URL" + Request.RawUrl+"<br>");
Response.Write("当前请求的URL" + Request.Url+"<br>");
Response.Write("客户端HTTP传输的方法" +Request.HttpMethod+"<br>");
Response.Write("原始用户代理信息" + Request.UserAgent+"<br>");
}
//Response.Write(Request.Browser.Version);