网址:http://localhost:1897/News/Press/Content.aspx/123?id=1#toc
Request.ApplicationPath /
Request.PhysicalPath D:\Projects\Solution\web\News\Press\Content.aspx
System.IO.Path.GetDirectoryName(Request.PhysicalPath) D:\Projects\Solution\web\News\Press
Request.PhysicalApplicationPath D:\Projects\Solution\web\
System.IO.Path.GetFileName(Request.PhysicalPath) Content.aspx
Request.CurrentExecutionFilePath /News/Press/Content.aspx
Request.FilePath /News/Press/Content.aspx
Request.Path /News/Press/Content.aspx/123
Request.RawUrl /News/Press/Content.aspx/123?id=1
Request.Url.AbsolutePath /News/Press/Content.aspx/123
Request.Url.AbsoluteUri http://localhost:1897/News/Press/Content.aspx/123?id=1
Request.Url.Scheme http
Request.Url.Host localhost
Request.Url.Port 1897
Request.Url.Authority localhost:1897
Request.Url.LocalPath /News/Press/Content.aspx/123
Request.PathInfo /123
Request.Url.PathAndQuery /News/Press/Content.aspx/123?id=1
Request.Url.Query ?id=1
Request.Url.Fragment  
Request.Url.Segments /
News/
Press/
Content.aspx/
123

出处:https://www.cnblogs.com/oneivan/archive/2011/12/19/2292872.html

ASP.NET 取得 Request URL 的各个部分和通过ASP.NET获取URL地址的方法的更多相关文章

  1. asp.net获取ip地址的方法

    在ASP中使用 Request.ServerVariables("REMOTE_ADDR") 来取得客户端的IP地址,但如果客户端是使用代理服务器来访问,那取到的就是代理服务器的I ...

  2. JS中的的Url传递中文参数乱码,如何获取Url中参数问题

    一:Js的Url中传递中文参数乱码问题,重点:encodeURI编码,decodeURI解码: 1.传参页面Javascript代码:<script type=”text/javascript” ...

  3. 通过request获取ID地址的方法

    // 获取IP地址 public static String getIpAddr(HttpServletRequest request) {  String ip = request.getHeade ...

  4. Asp.net MVC Request Life Cycle

    Asp.net MVC Request Life Cycle While programming with Asp.net MVC, you should be aware of the life o ...

  5. C#获取Url不同路径的方法大全

    在 C# 中,用 Request 对象来获取 Url  的各种路径,包括上一页 Url.域名.绝对路径.相对路径和物理路径.虽然在某些情况下,无法获取到 Url,但可以获取到大部分情况下的 Url,下 ...

  6. javascript获取url参数的方法

    发布:thatboy   来源:Net     [大 中 小] 本文介绍下,在javascript中取得url中某一个参数的方法,这里分享一个小例子,供大家学习参考下.本文转自:http://www. ...

  7. 获取url后面的参数的方法

    1. function GetRequest() { var url = 'http://wwww.jb51.net/?q=js'; //获取url中"?"符后的字串 if (ur ...

  8. 使用jquery获取url上的参数(笔记)

    使用jquery获取url上的参数(笔记) 一.做作业时经常要获取url上的参数 1.当url上有多个参数时 从互联网找到了一个方法 (function ($) { $.getUrlParam = f ...

  9. JS获取url请求参数

    JS获取url请求参数,代码如下: // 获取url请求参数 function getQueryParams() { var query = location.search.substring(1) ...

随机推荐

  1. Docker安装ES和Kibana

    1.ES安装 1.下载ES镜像问题 docker pull elasticsearch 2.运行ES docker run -it --name elasticsearch -d -p 9200:92 ...

  2. RSA签名,加解密处理核心文件

    import java.io.ByteArrayOutputStream; import java.io.UnsupportedEncodingException; import java.secur ...

  3. python web开发——django学习(二)第一个django网站运行成功

    1.写message_form.html <!DOCTYPE html> <html lang="en"> <head> <meta ch ...

  4. 安防视频互联网化的EasyDSS流媒体服务器不但能Easy安防流媒体的开发而且能更加互联网化视频协议的输出

    开发EasyDSS的初衷 自从12年开始做EasyDarwin的时候,当时眼光一直都仅仅局限在安防监控视频这一块,对RTMP没有太大的重视,对于后起之秀HLS更是没有太多关注,然而经历了15直播火热的 ...

  5. Java 8 stream 经典示例

    package org.study2.java8.stream; import org.junit.Test; import java.util.*; import java.util.stream. ...

  6. 新手配置LNMP环境教程

    回顾一下这几天自己配置LNMP环境踩得坑,希望帮助更多人 前期准备:VMtool.Linux.Nginx.Mysql.PHP.cmake 版本如下:Centos6.nginx1.6.0.mysql5. ...

  7. python 数据库导入excel

    import MySQLdb import xlwt def outMySQL(file_name): wb = xlwt.Workbook() sh = wb.add_sheet('sheet 1' ...

  8. Windows中使用 Python 调用 Matlab 程序

    https://ww2.mathworks.cn/help/matlab/matlab_external/system-and-configuration-requirements.html http ...

  9. Word 中直引号和弯引号的相互替换

    直引号替换成弯引号 弯引号替换成直引号 未完 ...... 点击访问原文(进入后根据右侧标签,快速定位到本文)

  10. java笔记2—函数

    函数: 1.什么是函数?       函数是定义在类中具有特定功能的一段独立小程序.       函数也称方法. 2.函数的格式:      [ 修饰符 ] 返回值类型 函数名(参数类型 形式参数)  ...