ASP.NET获取客户端信息
protected void Page_Load(object sender, EventArgs e)
{
///使用反射机制输出浏览器各个属性
foreach (System.Reflection.PropertyInfo pi in Request.Browser.GetType().GetProperties())
{
if (pi.GetType().BaseType.Name == "PropertyInfo")
{
try
{
Response.Write(pi.Name + "=" + pi.GetValue(Request.Browser, null).ToString() + "</br>");
}
catch
{
continue;
}
}
}
}摘自:《精通ASP.NET 2.0 的 Web 2.0 应用:Blog.Tags.Rss.NAS.XML 社区.Ajax Mail》
本贴子以“现状”提供且没有任何担保,同时也没有授予任何权利
This posting is provided "AS IS" with no warranties, and confers no rights.
This posting is provided "AS IS" with no warranties, and confers no rights.

浙公网安备 33010602011771号