ASP.NET 取得 Request URL 的各个部分和通过ASP.NET获取URL地址的方法
网址: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地址的方法的更多相关文章
- asp.net获取ip地址的方法
在ASP中使用 Request.ServerVariables("REMOTE_ADDR") 来取得客户端的IP地址,但如果客户端是使用代理服务器来访问,那取到的就是代理服务器的I ...
- JS中的的Url传递中文参数乱码,如何获取Url中参数问题
一:Js的Url中传递中文参数乱码问题,重点:encodeURI编码,decodeURI解码: 1.传参页面Javascript代码:<script type=”text/javascript” ...
- 通过request获取ID地址的方法
// 获取IP地址 public static String getIpAddr(HttpServletRequest request) { String ip = request.getHeade ...
- 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 ...
- C#获取Url不同路径的方法大全
在 C# 中,用 Request 对象来获取 Url 的各种路径,包括上一页 Url.域名.绝对路径.相对路径和物理路径.虽然在某些情况下,无法获取到 Url,但可以获取到大部分情况下的 Url,下 ...
- javascript获取url参数的方法
发布:thatboy 来源:Net [大 中 小] 本文介绍下,在javascript中取得url中某一个参数的方法,这里分享一个小例子,供大家学习参考下.本文转自:http://www. ...
- 获取url后面的参数的方法
1. function GetRequest() { var url = 'http://wwww.jb51.net/?q=js'; //获取url中"?"符后的字串 if (ur ...
- 使用jquery获取url上的参数(笔记)
使用jquery获取url上的参数(笔记) 一.做作业时经常要获取url上的参数 1.当url上有多个参数时 从互联网找到了一个方法 (function ($) { $.getUrlParam = f ...
- JS获取url请求参数
JS获取url请求参数,代码如下: // 获取url请求参数 function getQueryParams() { var query = location.search.substring(1) ...
随机推荐
- vue---数据列表过滤筛选
使用vue进行数据过滤筛选是比较常用的功能,常见的使用场景就是搜索框数据筛选过滤了.简单示例: <template> <div> <input type="te ...
- 阮一峰的ES6---Promise对象
https://www.imooc.com/article/20580?block_id=tuijian_wz Promise的含义promise是异步编程的一种解决方法,比传统的回调函数和事件更合理 ...
- 如何在自己的MacBook上体验OpenShift 4.1
在4版本后,CDK和minishift基本不跟新了,取代的是一个CodeReady Containter,定位和CDK以及minishift一样,简称CRC,是在本地环境中运行一个开发环境,目前仍然是 ...
- [LeetCode] 47. Permutations II 全排列 II
Given a collection of numbers that might contain duplicates, return all possible unique permutations ...
- C# 与 .NET Framework 对应关系
C#各版本新增加功能(系列文章) 本系列文章主要整理并介绍 C# 各版本的新增功能. C# 8.0 C#8.0 于 2019年4月 随 .NET Framework 4.8 与 Visual St ...
- dubbo源码分析01:SPI机制
一.什么是SPI SPI全称为Service Provider Interface,是一种服务发现机制,其本质是将接口实现类的全限定名配置在文件中,并由服务加载器读取配置文件.这样可以在运行时,动态为 ...
- 【转帖】你知道X86构架,你知道SH构架吗?
你知道X86构架,你知道SH构架吗? https://www.eefocus.com/mcu-dsp/363100 前面我们讲到了 8 位处理器,32 位处理器,以及 X86 构架,那么除了这些还 ...
- C语言函数库帮助文档
C语言函数库帮助文档 安装 1.C语言库函数基本的帮助文档 sudo apt-get install manpages sudo apt-get install manpages-de sudo ap ...
- 使用VS Code快速编写HTML
VS Code 有自动补全HTML代码方法体的功能 1.打开VS Code并新建文件,点击底部右侧语言模式选项,默认为纯文本(plaintext),将其改为HTML. 2.在空文件第一行输入”!“,光 ...
- MySQL练手小试题
创建表和数据 创建class表 create table class ( cid int(11) primary key auto_increment, caption varchar(32) not ...