ASP.NET中获得页面、服务器端信息的有用Request.ServerVariables
来源:互联网 发布:pdf.js php使用教程 编辑:程序博客网 时间:2024/05/16 04:44
常常用到,获得当前页面的IP地址,服务器的IP地址,获得请求页面的路径等,这些得到页面相应信息的Request.ServerVariables参数。于是,使用foreach,把所有的全部列表,请其有用的参数记于此,以供自己和他人便用。
方法:
Request.ServerVariables["参数名"]
返回 string类型的值。
参数:
请求的网址:http://localhost/hljtcpoa/cpadmin/term_list.aspx?id=5
以下是结果:冒号左边是参数,右边中以上网址的执行结果
APPL_PHYSICAL_PATH: E: et cpoa cpoa
LOCAL_ADDR: 127.0.0.1
PATH_INFO: /hljtcpoa/cpadmin/term_list.aspx
PATH_TRANSLATED: E: et cpoa cpoacpadmin erm_list.aspx
QUERY_STRING: id=5
REMOTE_ADDR: 127.0.0.1
REMOTE_HOST: 127.0.0.1
SCRIPT_NAME: /hljtcpoa/cpadmin/term_list.aspx
SERVER_NAME: localhost
SERVER_PORT: 80
SERVER_SOFTWARE: Microsoft-IIS/6.0
URL: /hljtcpoa/cpadmin/term_list.aspx
HTTP_HOST: localhost
HTTP_REFERER: http://localhost/hljtcpoa/cpadmin/term_list.aspx?id=5
//获得上一页的来源,非常有用。
方法:
Request.ServerVariables["参数名"]
返回 string类型的值。
参数:
请求的网址:http://localhost/hljtcpoa/cpadmin/term_list.aspx?id=5
以下是结果:冒号左边是参数,右边中以上网址的执行结果
APPL_PHYSICAL_PATH: E: et cpoa cpoa
LOCAL_ADDR: 127.0.0.1
PATH_INFO: /hljtcpoa/cpadmin/term_list.aspx
PATH_TRANSLATED: E: et cpoa cpoacpadmin erm_list.aspx
QUERY_STRING: id=5
REMOTE_ADDR: 127.0.0.1
REMOTE_HOST: 127.0.0.1
SCRIPT_NAME: /hljtcpoa/cpadmin/term_list.aspx
SERVER_NAME: localhost
SERVER_PORT: 80
SERVER_SOFTWARE: Microsoft-IIS/6.0
URL: /hljtcpoa/cpadmin/term_list.aspx
HTTP_HOST: localhost
HTTP_REFERER: http://localhost/hljtcpoa/cpadmin/term_list.aspx?id=5
//获得上一页的来源,非常有用。
- ASP.NET中获得页面、服务器端信息的有用Request.ServerVariables
- ASP.NET中获得页面、服务器端信息的有用Request.ServerVariables
- asp.net中Request.ServerVariables的用法
- asp.net的Request.ServerVariables参数说明
- asp.net里面Request.ServerVariables的参数
- asp.net的Request.ServerVariables参数说明
- asp.net的Request.ServerVariables参数说明
- asp中Request.ServerVariables的参数集
- asp中Request.ServerVariables的参数集
- ASP 中request.serverVariables 的内容
- ASP.NET中用Request.ServerVariables获取各种信息
- ASP中用Request.ServerVariables获得的值列表
- asp asp.net的Request.ServerVariables参数说明
- asp中Request.ServerVariables全集
- Asp.net中遍历 Request.ServerVariables 集合(C#)
- asp.net的Request.ServerVariables获取电脑ip
- ASP.NET 页面的服务器端
- 使用ServerVariables 获得ASP.NET环境变量
- [新概念三]Lesson 6 - Smash-and-grab
- 将表中的数据生成SQL脚本,在查询分析器中执行这些脚本后自动将数据导入到SQL Server中
- 初入IT,我该怎么办?
- VC------Windows关机函数,休眠函数使用大全(适用Windows所有操作平台)
- 重回Mapinfo开发
- ASP.NET中获得页面、服务器端信息的有用Request.ServerVariables
- VC---强制重启电脑的代码
- MOXA NPort5630串口设备联网服务器
- C#读写注册表
- MapInfo注记的数据库存放解决方案
- K-Means
- js日期
- c字符串函数源码
- ArcIMS 9.2 直连 ArcSDE for Oracle 10g (转载)