请问winform怎样获取浏览器信息? 刚研究winform,急,先申明并非非法收集客户信息,是经客户允许安装的;时间紧啊,请高手指点:获取当前浏览Url,开始浏览时间,退出浏览时间; 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Request.Browser.MajorVersion.ToString();//获取客户端浏览器的(主)版本号 Request.Browser.Version.ToString();//获取客户端浏览器的完整版本号 Request.Browser.Platform.ToString();//获取客户端使用平台的名字 Request.UserHostAddress.ToString(); //获取远程客户端主机IPHttpRequest.Url 获取有关当前请求的URL的信息。 HttpRequest.UrlReferrer 获取有关客户端上次请求的URL的信息,该请求链接到当前的URL。 HttpRequest.UserAgent 获取客户端浏览器的原始用户代理信息。 HttpRequest.UserHostAddress 获取远程客户端的 IP 主机地址。 HttpRequest.UserHostName 获取远程客户端的 DNS 名称。 HttpRequest.UserLanguages 获取客户端语言首选项的排序字符串数组。System.Text.StringBuilder strLabel = new System.Text.StringBuilder(); HttpBrowserCapabilities bc = Request.Browser; strLabel.Append("您的浏览器的分辨率为:"); strLabel.Append(Request.Form["WidthPixel"]); strLabel.Append("×"); strLabel.Append(Request.Form["HeightPixel"]); strLabel.Append(""); strLabel.Append("浏览器基本信息:"); strLabel.Append("Type = " + bc.Type + ""); strLabel.Append("Name = " + bc.Browser + ""); strLabel.Append("Version = " + bc.Version +""); strLabel.Append("Major Version = " + bc.MajorVersion + ""); strLabel.Append("Minor Version = " + bc.MinorVersion + ""); strLabel.Append("Platform = " + bc.Platform + ""); strLabel.Append("Is Beta = " + bc.Beta + ""); strLabel.Append("Is Crawler = " + bc.Crawler + ""); strLabel.Append("Is AOL = " + bc.AOL + ""); strLabel.Append("Is Win16 = " + bc.Win16 + ""); strLabel.Append("Is Win32 = " + bc.Win32 + ""); strLabel.Append("支持 Frames = " + bc.Frames + ""); strLabel.Append("支持 Tables = " + bc.Tables + ""); strLabel.Append("支持 Cookies = " + bc.Cookies + ""); strLabel.Append("支持 VB Script = " + bc.VBScript + ""); strLabel.Append("支持 JavaScript = " + bc.JavaScript + ""); strLabel.Append("支持 Java Applets = " + bc.JavaApplets + ""); strLabel.Append("支持 ActiveX Controls = " + bc.ActiveXControls + ""); strLabel.Append("CDF = " + bc.CDF + ""); strLabel.Append("W3CDomVersion = " + bc.W3CDomVersion.ToString() + ""); strLabel.Append("UserAgent = " + Request.UserAgent + ""); strLabel.Append("UserLanguages = " + Request.UserLanguages[0].ToString() + ""); strLabel.Append(""); strLabel.Append("客户端计算机基本配置:"); strLabel.Append("UserHostName = " + Request.UserHostName + ""); strLabel.Append("UserHostAddress = " + Request.UserHostAddress + ""); strLabel.Append("PDF 6.0 插件是否安装 = " + Request.Form["PDF"] + ""); Label1.Text = strLabel.ToString(); } } 控件重叠与鼠标移动的问题 C# ref和out问题 Winform中,利用回车键切换焦点的问题 一个绞尽脑汁都无答案的问题 C# 数据集操作问题 关于多线程的问题,请小山,秋枫等热心高手帮助 如何用最简单的方法,取得局域网中的另一台机器的时间,Winform C# WORD 问题 求助 如何完全删除xml节点 网络高手们帮帮忙吧[已经问了好久了] 凭证录入控件有的给我发一个 关于socket接收端的问题
Request.Browser.Platform.ToString();//获取客户端使用平台的名字
Request.UserHostAddress.ToString(); //获取远程客户端主机IPHttpRequest.Url 获取有关当前请求的URL的信息。
HttpRequest.UrlReferrer 获取有关客户端上次请求的URL的信息,该请求链接到当前的URL。
HttpRequest.UserAgent 获取客户端浏览器的原始用户代理信息。
HttpRequest.UserHostAddress 获取远程客户端的 IP 主机地址。
HttpRequest.UserHostName 获取远程客户端的 DNS 名称。
HttpRequest.UserLanguages 获取客户端语言首选项的排序字符串数组。System.Text.StringBuilder strLabel = new System.Text.StringBuilder();
HttpBrowserCapabilities bc = Request.Browser;
strLabel.Append("您的浏览器的分辨率为:");
strLabel.Append(Request.Form["WidthPixel"]);
strLabel.Append("×");
strLabel.Append(Request.Form["HeightPixel"]);
strLabel.Append("");
strLabel.Append("浏览器基本信息:");
strLabel.Append("Type = " + bc.Type + "");
strLabel.Append("Name = " + bc.Browser + "");
strLabel.Append("Version = " + bc.Version +"");
strLabel.Append("Major Version = " + bc.MajorVersion + "");
strLabel.Append("Minor Version = " + bc.MinorVersion + "");
strLabel.Append("Platform = " + bc.Platform + "");
strLabel.Append("Is Beta = " + bc.Beta + "");
strLabel.Append("Is Crawler = " + bc.Crawler + "");
strLabel.Append("Is AOL = " + bc.AOL + "");
strLabel.Append("Is Win16 = " + bc.Win16 + "");
strLabel.Append("Is Win32 = " + bc.Win32 + "");
strLabel.Append("支持 Frames = " + bc.Frames + "");
strLabel.Append("支持 Tables = " + bc.Tables + "");
strLabel.Append("支持 Cookies = " + bc.Cookies + "");
strLabel.Append("支持 VB Script = " + bc.VBScript + "");
strLabel.Append("支持 JavaScript = " + bc.JavaScript + "");
strLabel.Append("支持 Java Applets = " + bc.JavaApplets + "");
strLabel.Append("支持 ActiveX Controls = " + bc.ActiveXControls + "");
strLabel.Append("CDF = " + bc.CDF + "");
strLabel.Append("W3CDomVersion = " + bc.W3CDomVersion.ToString() + "");
strLabel.Append("UserAgent = " + Request.UserAgent + "");
strLabel.Append("UserLanguages = " + Request.UserLanguages[0].ToString() + "");
strLabel.Append("");
strLabel.Append("客户端计算机基本配置:");
strLabel.Append("UserHostName = " + Request.UserHostName + "");
strLabel.Append("UserHostAddress = " + Request.UserHostAddress + "");
strLabel.Append("PDF 6.0 插件是否安装 = " + Request.Form["PDF"] + "");
Label1.Text = strLabel.ToString();
}
}