.NET获取URL的各种方式及其区别
原文发布时间为:2009-11-11 —— 来源于本人的百度文章 [由搬家工具导入]
http://www.test.com/testweb/default.aspx?id=1
Request.ApplicationPath: /testweb
Request.CurrentExecutionFilePath: /testweb/default.aspx
Request.FilePath: /testweb/default.aspx
Request.Path: /testweb/default.aspx
Request.PathInfo:
Request.PhysicalApplicationPath: E:\WWW\testweb\
Request.PhysicalPath: E:\WWW\testweb\default.aspx
Request.RawUrl: /testweb/default.aspx?id=1
Request.Url.AbsolutePath: /testweb/default.aspx
Request.Url.AbsoluteUri: http://www.test.com/testweb/default.aspx?id=1
Request.Url.Host: www.test.com
Request.Url.LocalPath: /testweb/default.aspx
Response.Write("<b>Request.ApplicationPath:</b> " + Request.ApplicationPath + "<br>");
Response.Write("<b>Request.CurrentExecutionFilePath:</b> " + Request.CurrentExecutionFilePath + "<br>");
Response.Write("<b>Request.FilePath:</b> " + Request.FilePath + "<br>");
Response.Write("<b>Request.Path:</b> " + Request.Path + "<br>");
Response.Write("<b>Request.PathInfo:</b> " + Request.PathInfo + "<br>");
Response.Write("<b>Request.PhysicalApplicationPath:</b> " + Request.PhysicalApplicationPath + "<br>");
Response.Write("<b>Request.PhysicalPath:</b> " + Request.PhysicalPath + "<br>");
Response.Write("<b>Request.RawUrl:</b> " + Request.RawUrl + "<br>");
Response.Write("<b>Request.Url.AbsolutePath:</b> " + Request.Url.AbsolutePath + "<br>");
Response.Write("<b>Request.Url.AbsoluteUri:</b> " + Request.Url.AbsoluteUri + "<br>");
Response.Write("<b>Request.Url.Host:</b> " + Request.Url.Host + "<br>");
Response.Write("<b>Request.Url.LocalPath:</b> " + Request.Url.LocalPath + "<br>");
.NET获取URL的各种方式及其区别的更多相关文章
- get方法与post方法的区别与js获取url参数的方式
1.get方法与post方法的区别: 区别一:get重点在从服务器上获取资源,post重点在向服务器发送数据:区别二:get传输数据是通过URL请求,以field(字段)= value的形式,置于UR ...
- javascript获取url参数的方式
方式一: 推荐使用此方式: url链接为:newsDetail.html?id=8a8080e35f90d9fd015f90dac7750001&modelId=123456 var URL ...
- js获取url参数值的方式
定义方法: function getParam(paramName) { paramValue = ""; isFound = false; paramName = paramNa ...
- js获取url中的参数,url中传递中文的时候通过js解码的方式
如果传递的参数是: <a href="${pageContext.request.contextPath}/productdisplay/productDisplay_productD ...
- js获取url參数值的两种方式具体解释
有个url例如以下: http://passport.csdn.net/account/login? from=http%3a%2f%2fwrite.blog.csdn.net%2fpostedit ...
- js获取url参数值的几种方式
一.原生js获取URL参数值: 比如当前URL为:http://localhost:8080/#/page2?id=100&name=guanxy <template> <d ...
- js获取url参数值的两种方式
js获取url参数值的方法有很多,下面也为大家介绍两种. 方法一:正则分析法 function getQueryString(name) { var reg = new RegExp(" ...
- 获取页面URL两种方式
以请求http://localhost:8080/doctor/demo?code=1为例 一:用java代码获取 //获取URL中的请求参数.即?后的条件 code=1 String querySt ...
- php 后台转发和重定向的区别及kohana框架当前url加参数方式
1.重定向是浏览器行为,浏览器地址有变化:转发是后台服务器完成, url地址不变化. 2.kohana获取URL 当前url是http://soyoung.kohana.com/blog/add?id ...
随机推荐
- spring boot 集成swagger2
1 在pom.xml中加入Swagger2的依赖 <dependency> <groupId>io.springfox</groupId> <artifac ...
- JZOJ 3493. 【NOIP2013模拟联考13】三角形
3493. [NOIP2013模拟联考13]三角形(triangle) (File IO): input:triangle.in output:triangle.out Time Limits: 10 ...
- f触发器、存储过程
drop trigger trig_insert--删除触发器
- IOS开发---菜鸟学习之路--(四)-登陆界面
本篇的内容其实大家 参照橘子的那本开发的书的话 上面讲解的是更详细的 一些实现. 我这边唯一的区别就是 做了网络数据的获取 以及 验证成功后 进行界面的跳转.. 第四篇了 本篇主讲登陆模块 首先先放 ...
- centOS如何设置时间同步
1.进入系统-管理-时间和日期 2.这个需要root权限才能进行设置,在弹出框中填入root密码 3.设置时间和日期-勾选同步,并且选择NTP时间服务器,点击确定 4.选择时区为亚洲上海点击保存 ...
- 使用Fiddler对Android应用进行抓包
1. 打开Fiddler软件,效果图如下: 2. 首先,确保安装 Fiddler 的电脑和你的手机在同一局域网内,因为Fiddler只是一个代理,需要将手机的代理指向 PC 机,不能互相访问是不行的 ...
- Shell脚本编程
1.linux中的变量 linux中的变量分为环境变量和普通变量,其中环境变量可以理解为全局变量,在所有shell的子程序中都可以引用,普通变量只能在自己的shell程序中使用,程序结束后变量无法保留 ...
- 重新安装Linux自带的JDK
1.卸载现有jdk 查看本机已经安装的JDK的版本: [root@mcb ~]# java -version java version "1.6.0" OpenJDK Runtim ...
- input框的限制(仅数字以及电话号码的限制)
电话号码限制 <input type="text" id="phone" maxlength="11" onkeyup=" ...
- 监视网络接口TCP状态信息数据有多种工具或命令。下面举例一些:
nstat命令 nstat kernel ======= ss -s == netstat -i netstat -s ip -s link sar -n DEV 1