如果测试的url地址是http://www.test.com/testweb/default.aspx, 结果如下:

Request.ApplicationPath: /testweb
Request.CurrentExecutionFilePath: /testweb/default.aspx
Request.FilePath: /testweb/default.aspx
Request.Path: /testweb/default.aspx
Request.PhysicalApplicationPath: E:\WWW\testwebRequest.PhysicalPath: E:\WWW\testweb\default.aspx
Request.RawUrl: /testweb/default.aspx
Request.Url.AbsolutePath: /testweb/default.aspx
Request.Url.AbsoluteUrl: http://www.test.com/testweb/default.aspx
Request.Url.Host: http://www.test.com/
Request.Url.LocalPath: /testweb/default.aspx

C# Request获取URL常见用法的更多相关文章

  1. Request获取url各种信息的方法

    1.Request获取url各种信息的方法 测试的url地址:http://www.test.com/testweb/default.aspx, 结果如下: Request.ApplicationPa ...

  2. jsp Request获取url信息的各种方法比较

    从Request对象中可以获取各种路径信息,以下例子: 假设请求的页面是index.jsp,项目是WebDemo,则在index.jsp中获取有关request对象的各种路径信息如下 String p ...

  3. Request 获取Url

    1.获取页面,HttpContext.Current.Request也是Request //获取当前页面url string myurl = HttpContext.Current.Request.U ...

  4. C# Request 获取Url

    1.获取页面,HttpContext.Current.Request也是Request //获取当前页面url string myurl = System.Web.HttpContext.Curren ...

  5. request获取url链接和参数

            //Returns the part of this request's URL from the protocol name up to the query string in th ...

  6. javascript中如何使用js脚本模拟"request"获取url后参数值呢?

    转自:猫猫小屋--js获取url后参数信息 摘要: 下文讲述javascript中使用js代码获取url地址后面的参数值的方法分享,如下所示: 实现思路: 使用正则表达式对参数值进行匹配,获取参数后的 ...

  7. request获取url的方法总结

    辣么多属性.方法  不用就忘了  ,当需要用的时候挠头也想不到,现在总结一下 以备用 例如:http://localhost/testweb/default.aspx 1.Request.Applic ...

  8. Request获取URL地址相应方法

    以项目为BBS为例,以下代码置于modify.jsp: 1.request.getLocalName(): akiradunn 2.request.getServerName(): localhost ...

  9. 从request获取各种路径总结 request.getRealPath("url")

    转载:http://blog.csdn.net/piaoxuan1987/article/details/8541839 equest.getRealPath() 这个方法已经不推荐使用了,代替方法是 ...

随机推荐

  1. Python模拟鼠标和键盘操作实现重复性操作

    前言 由于工作需要,要利用某软件去采集数据,做重复的动作大概500多次.所以想写一个程序代替人,去点击和输入. 一开始的思路有两个:1.用Python或者windows对此软件直接操作.2.利用Pyt ...

  2. 如何获取select中的value、text、index相关值 && 如何获取单选框中radio值 && 触发事件 && radio 默认选中

    如何获取select中的value.text.index相关值 select还是比较常用的一个标签,如何获取其中的内容呢? 如下所示: <select id="select" ...

  3. Oracle 删除监听程服务

    1.开始->运行->输入regidit ->->->->->红框内的右键删除 2.开始->运行->输入regidit ->->-> ...

  4. linux下VI模式中上下左右键和回退键出现字母

    1.编辑/etc/vim/vimrc.tiny 由于/etc/vim/vimrc.tiny的拥有者是root用户,所以要在root的权限下对这个文件进行修改.很简单,这个文件里面的倒数第二句话是“se ...

  5. poj 2572 Hard to Believe, but True!

    Hard to Believe, but True! Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 3537   Accep ...

  6. 基于URL权限拦截的实现

    一.实现原理 1.实现原理   本示例采用SpringMVC的拦截器来实现一个基于URL的权限拦截. 2.权限管理流程 二.数据库搭建 1.用户表(sys_user) (1)表结构 (2)表字段说明 ...

  7. WPF基础控件

    1.所有基础控件结束(英文) http://www.dotnetperls.com/tooltip-wpf 2.wpf- DataGrid 常用属性和事件 3.

  8. css三栏布局方案整理

    日常开发中,经常会用到css三栏布局,现将工作中常用的css 三栏布局整理如下: 什么是三栏布局: 三栏布局,顾名思义就是两边固定,中间自适应. 一. float布局 <!DOCTYPE htm ...

  9. mysql字符集的修改

    修改数据库字符集: 代码如下: ALTER DATABASE db_name DEFAULT CHARACTER SET character_name [COLLATE ...];   把表默认的字符 ...

  10. Spring学习笔记:Spring整合Mybatis学习PPT(三:整合思路)

    三.Spring-Mybatis的整合思路