//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的地址、参数、参数值、各种属性的更多相关文章

  1. QT 通过QNetworkReply *获取对应请求的URL地址

    [1]QT 通过QNetworkReply *获取对应请求的URL地址 reply->url().toString(); Good Good Study, Day Day Up. 顺序 选择 循 ...

  2. asp.net获取当前请求的url

    asp.net获取当前请求的url 设当前页完整地址是:http://www.dgshop.com/Home/Manager?id=2&para=ASFDG [1]获取 完整url 代码如下: ...

  3. 获取一个请求的URL内容

    using System.Net; 1. // 创建一个请求的URL.          WebRequest request = WebRequest.Create("http://www ...

  4. JAVA获取当前请求的URL地址,包含请求链接中的参数

    /** * 获得当前访问的URL路径 * @param request * @return */ public static String getLocation(HttpServletRequest ...

  5. 关于requestMapping 进行url映射实现小小知识点 以及如何获取请求的url中的参数

    requstMapping 用来处理url映射  可以作用在controller类上  也可以作用在方法上 经常使用的方式  通过接收一种映射关系 @RequestMapping("/del ...

  6. 用get方式提交请求的url带有中文参数

    又碰到JSP页面中文乱码问题,经过一次encodeURI处理后仍旧是乱码,后来经过两次encodeURI后正常显示中文 以前也碰到过同样的问题,没深究,这次网上搜集了一些资料,记录下来留做备份 ___ ...

  7. 获取本地请求的真实IP地址

    1 /** 2 * 自定义访问对象工具类 3 * 4 * 获取对象的IP地址等信息 5 * 6 */ 7 public class CusAccessObjectUtil { 8 9 /** 10 * ...

  8. 获取HTTP请求头中的地址

    技术交流群:233513714 public static String getIpAddr(HttpServletRequest request) { String ip = request.get ...

  9. Yii1 获取当前请求的url

    echo Yii::app()->getRequest()->getUrl();

随机推荐

  1. ELK 5.0 组件后台启动

    elasticsearch 后台启动,只需要 在bin目录下执行: ./elasticsearch -d 查看是否启动成功使用: ps aux|grep elasticsearch kibana 后台 ...

  2. 如何在CentOS 5/6上安装EPEL 源

    EPEL 是什么? EPEL (Extra Packages for Enterprise Linux,企业版Linux的额外软件包) 是Fedora小组维护的一个软件仓库项目,为RHEL/CentO ...

  3. 用户 'IIS APPPOOL\ASP.NET V4.0' 登录失败 解决办法…………

    在iis管理器中-->应用程序池-->ASP.NET V4.0---->高级设置-->标识-->改为localSystem

  4. 多语言配置--LogisticsPlatform物流平台系统

    先看:LanguageProvider.cs   中几个主要方法 1.读取默认语言 附user.ini文件: 2.获取语言类型 附LanguageType.xml 3.读取语言资源 附:   看ILa ...

  5. debian/ubuntu 下ISE安装

    1. planAhead无法打开的问题 原因: debian中使用dash,跟planAhead使用的bash略有不同 解决: 将/bin/sh 的链接从dash改为bash 2. FPGA Edit ...

  6. ansible 自动化(1)

    安装篇: yum安装 1.安装第三方epel源 centos 6的epel rpm -ivh http://mirrors.sohu.com/fedora-epel/6/x86_64/epel-rel ...

  7. testMarkDown

    title: git常用命令 date: 2015-10-27 10:28:25 categories: git tags: git 添加 SSH 公钥 Windows 平台中,可以使用 Git Ba ...

  8. [leetcode 37]sudoku solver

    1 题目: 根据给出的数独,全部填出来 2 思路: 为了做出来,我自己人工做了一遍题目给的数独.思路是看要填的数字横.竖.子是否已经有1-9的数字,有就剔除一个,最后剩下一个的话,就填上.一遍一遍的循 ...

  9. ie7,8常见bug,共计257个bug汇总?如何解决ie的历史bug

    ie7.8常见bug,共计257个bug汇总 针对web开发者来说,浏览器的bug,特备是ie的bug是很多人的噩梦,因为ie的更新换代没有ff,chrome,safari,opera那么快,而且ie ...

  10. 那些年使用Hive踩过的坑

    1.概述 这个标题也是用血的教训换来的,希望对刚进入hive圈的童鞋和正在hive圈爬坑的童鞋有所帮助.打算分以下几个部分去描述: Hive的结构 Hive的基本操作 Hive Select Hive ...