获取当前请求的URL的地址、参数、参数值、各种属性
2016-02-29 15:06
726 查看
//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
View Code
相关文章推荐
- MySQL分库分表使用Snowflake全局ID生成器(3rd)
- MediaPlayerActivity MainList
- 大数据架构师之路-大数据产品大全
- Android基础核心总结之二-----Spinner、AutoCompleteTextView(自动完成控件)
- JAVA学习【9】 集合框架TreeSet类和TreeMap类的排序
- CH03
- 批处理导出安卓手机日志文件,压缩,修改文件名以当前时间点
- 把node应用部署到heroku
- FFMPEG解码264文件步骤
- [oracle] 解决X64操作系统PL/SQL连接报错问题 make sure you have the 32 bits oracle client installed
- 外部文件读取
- json、对象、字符串互相转换
- virtualbox5.0.8 centos6.7 mini 安装
- JAVA 基础之 异常机制
- 杭电1002 涉及大数相加
- [poj 3630] Phone List trie 树
- Machine Learning on Spark--Data Type
- UVA 136(p120)----Ugly Numbers
- 手机上图片的放大缩小处理 touch——zoom
- 50.SLS is a private synonym for the SH.SALES table.