获取当前请求的URL的地址、参数、参数值、各种属性
//URL: http://localhost:1897/User/Press/UserContent.aspx/9878?id=1#toc
Request.ApplicationPath; //结果: /
Request.PhysicalPath; //结果: D:\Projects\Solution\web\User\Press\UserContent.aspx
System.IO.Path.GetDirectoryName(Request.PhysicalPath); //结果: D:\Projects\Solution\web\User\Press
Request.PhysicalApplicationPath; //结果: D:\Projects\Solution\web\
System.IO.Path.GetFileName(Request.PhysicalPath); //结果: UserContent.aspx
Request.CurrentExecutionFilePath; //结果: /User/Press/UserContent.aspx
Request.FilePath; //结果: /User/Press/UserContent.aspx
Request.Path; //结果: /User/Press/UserContent.aspx/9878
Request.RawUrl; //结果:l /User/Press/UserContent.aspx/9878?id=1
Request.Url.AbsolutePath; //结果: /User/Press/UserContent.aspx/9878
Request.Url.AbsoluteUri; //结果: http://localhost:1897/User/Press/UserContent.aspx/9878?id=1
Request.Url.Scheme; //结果: http
Request.Url.Host; //结果: localhost
Request.Url.Port; //结果: 1897
Request.Url.Authority; //结果:localhost:1897
Request.Url.LocalPath; //结果: /User/Press/UserContent.aspx/9878
Request.PathInfo; //结果: /9878
Request.Url.PathAndQuery; //结果: /User/Press/UserContent.aspx/9878?id=1
Request.Url.Query; //结果: ?id=1
获取当前请求的URL的地址、参数、参数值、各种属性的更多相关文章
- QT 通过QNetworkReply *获取对应请求的URL地址
[1]QT 通过QNetworkReply *获取对应请求的URL地址 reply->url().toString(); Good Good Study, Day Day Up. 顺序 选择 循 ...
- asp.net获取当前请求的url
asp.net获取当前请求的url 设当前页完整地址是:http://www.dgshop.com/Home/Manager?id=2¶=ASFDG [1]获取 完整url 代码如下: ...
- 获取一个请求的URL内容
using System.Net; 1. // 创建一个请求的URL. WebRequest request = WebRequest.Create("http://www ...
- JAVA获取当前请求的URL地址,包含请求链接中的参数
/** * 获得当前访问的URL路径 * @param request * @return */ public static String getLocation(HttpServletRequest ...
- 关于requestMapping 进行url映射实现小小知识点 以及如何获取请求的url中的参数
requstMapping 用来处理url映射 可以作用在controller类上 也可以作用在方法上 经常使用的方式 通过接收一种映射关系 @RequestMapping("/del ...
- 用get方式提交请求的url带有中文参数
又碰到JSP页面中文乱码问题,经过一次encodeURI处理后仍旧是乱码,后来经过两次encodeURI后正常显示中文 以前也碰到过同样的问题,没深究,这次网上搜集了一些资料,记录下来留做备份 ___ ...
- 获取本地请求的真实IP地址
1 /** 2 * 自定义访问对象工具类 3 * 4 * 获取对象的IP地址等信息 5 * 6 */ 7 public class CusAccessObjectUtil { 8 9 /** 10 * ...
- 获取HTTP请求头中的地址
技术交流群:233513714 public static String getIpAddr(HttpServletRequest request) { String ip = request.get ...
- Yii1 获取当前请求的url
echo Yii::app()->getRequest()->getUrl();
随机推荐
- 找一个四位数,要求该四位数的四倍刚好是该四位数的反序。 即b1b2b3b4 * 4 = b4b3b2b1
找一个四位数,要求该四位数的四倍刚好是该四位数的反序. 即b1b2b3b4 * 4 = b4b3b2b1 解: 第一步,确认最末位 假设 b1b2b3b4 + b4b3b2b1 = [x0]x1x2x ...
- linux下rm -r误删NTFS文件恢复方法
一时疏忽,手一抖,把整个挂载的F盘删了一半!顿时傻眼!! 被删的F盘是Windows下NTFS分区,在Ubuntu12.04中挂载了F盘,使用rm命令时粗心大意,误删了一半的数据. 血的教训告诉我们, ...
- VS2010 网页错误
VS2010向导添加消息处理时,弹出以上错误,原因之一为: 类内没有定义IDD的宏
- 老毛桃u盘装系统制作工具
老毛桃[url=http://www.laomaotao.cn.com/]一键u盘装系统下载[/url]告别繁琐,简单易用,一盘两用,携带方便.不需要任何技术基础,一键制作,自动完成制作,平时当U盘使 ...
- Chrome: Resource interpreted as Font but transferred with MIME type font/x-woff
最近,项目中加入了Bootstrap进行界面优化,但是,项目加载运行之后,控制台总是提示以下错误信息: GET http://localhost:8080/.../fonts/fontawesome- ...
- 插入排序-java
排序-插入排序 基本思想:将待排序表看作左右两部分,其中左边为有序区,右边为无序区, 整个排序过程就是将右边无序区中的元素逐个插入到左边的有序区中,以构成新的有序区. 平均时间:O(n2) 最好情况: ...
- ZabbixCPU温度监视-windows2008R2
1, speed-fan安装 SpeedFan - Access temperature sensor in your computer / http://www.almico.com/speedfa ...
- C++混合编程之idlcpp教程Lua篇(6)
上一篇在这 C++混合编程之idlcpp教程Lua篇(5) 第一篇在这 C++混合编程之idlcpp教程(一) 工程LuaTutorial4中加入了四个文件:LuaTutorial4.cpp, Tut ...
- [leetcode 25]Reverse Nodes in k-Group
1 题目: Given a linked list, reverse the nodes of a linked list k at a time and return its modified li ...
- 两个实用的工具推荐:ResxManager和ValueInjecter
一.ResxManager 1. 资源文件编辑工具ResxManager,这个工具可以在一个界面中编辑所有语言的内容. 2. 可以新增.删除key. 3. 注意:如果是新建的Resx,一定要有一 ...