//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. AutoMapper扩展

    扩展类:AutoMapExtention using System; using System.Collections.Generic; using System.Linq.Expressions; ...

  2. lazy?

    https://developer.jboss.org/wiki/LazyEJB31timerservicedeploymentstartingJBossAS600M5 2016-09-28 18:5 ...

  3. jQUery 1.9中被删除的API

    jQuery1.9删除了一些在以前版本中已经过时的api,想要把那些不够安全的.缺乏效率的.用处不大的,以及带有误导的特性统统去掉.如果你想升级你的jquery版本,但又使用了如下被删除的api的话, ...

  4. java基础5_数组

    一 数组是一个多个相同数据的集合.数组的长度一旦定义,将不能改变.数组的下标是从0开始的,到数组的长度-1结束. 1.数组的声明,初始化 int[] a = new int[3]{1,2,3}; in ...

  5. php CLI 模式下的传参方法

    在CLI模式(命令行界面 Command Line Interface)下,传入参数有如下3种方法: 一. getopt函数(PHP 4 >= 4.3.0, PHP 5) getopt - 从命 ...

  6. 转载:oracle null处理

    (1)NULL的基础概念,NULL的操作的基本特点NULL是数据库中特有的数据类型,当一条记录的某个列为NULL,则表示这个列的值是未知的.是不确定的.既然是未知的,就有无数种的可能性.因此,NULL ...

  7. 将EnyimMemcached从.NET Core RC1升级至RC2

    .NET Core RC1时project.json中的配置如下: { "version": "3.2.4", "summary": &qu ...

  8. STC12C5A60S2笔记2(存储)

    STC12C5A60S2单片机分为4个物理上独立的存储区域: 1. 程序flash存储器(60KB) 程序Flash存储器用以存储用户程序及数据.单片机复位后默认从0000H单元开始执行指令. 1) ...

  9. PC版淘宝UWP揭秘

    经过第一轮内测后的bug数量:65 2015/11/27 - bug数量 = 60 2015/11/30 - bug数量 = 53 2015/12/1 - bug数量 = 49 2015/12/2 - ...

  10. 人人都是 DBA(V)SQL Server 数据库文件

    SQL Server 数据库安装后会包含 4 个默认系统数据库:master, model, msdb, tempdb. SELECT [name] ,database_id ,suser_sname ...