通常,网站需要统计客户浏览的习惯,有针对性的对网站做出部分改善。。贴几句常用代码。。
protected void Page_Load(object sender, EventArgs e)
{
Response.Write("<font size=5>浏览器名称和版本号:<font/>" + Request.Browser.Type + "<br/>");
Response.Write("浏览器名称:" + Request.Browser.Browser + "<br/>");
Response.Write("客户端是否支持cookie:" + Request.Browser.Cookies + "<br/>");
Response.Write("浏览器平台:" + Request.Browser.Platform + "<br/>");
Response.Write("客户端ip地址:" + Request.UserHostAddress + "<br/>");
Response.Write("客户端DNS:" + Request.UserHostName + "<br/>");
Response.Write("当前请求的URL:" + Request.Url + "<br/>");
Response.Write("当前请求的虚拟路径:" + Request.Path + "<br/>");
Response.Write("当前请求的物理路径:" + Request.PhysicalApplicationPath + "<br/>");
}