.NET获取URL的各种方式及其区别
原文发布时间为:2009-11-11 —— 来源于本人的百度文章 [由搬家工具导入]
http://www.test.com/testweb/default.aspx?id=1
Request.ApplicationPath: /testweb
Request.CurrentExecutionFilePath: /testweb/default.aspx
Request.FilePath: /testweb/default.aspx
Request.Path: /testweb/default.aspx
Request.PathInfo:
Request.PhysicalApplicationPath: E:\WWW\testweb\
Request.PhysicalPath: E:\WWW\testweb\default.aspx
Request.RawUrl: /testweb/default.aspx?id=1
Request.Url.AbsolutePath: /testweb/default.aspx
Request.Url.AbsoluteUri: http://www.test.com/testweb/default.aspx?id=1
Request.Url.Host: www.test.com
Request.Url.LocalPath: /testweb/default.aspx
Response.Write("<b>Request.ApplicationPath:</b> " + Request.ApplicationPath + "<br>");
Response.Write("<b>Request.CurrentExecutionFilePath:</b> " + Request.CurrentExecutionFilePath + "<br>");
Response.Write("<b>Request.FilePath:</b> " + Request.FilePath + "<br>");
Response.Write("<b>Request.Path:</b> " + Request.Path + "<br>");
Response.Write("<b>Request.PathInfo:</b> " + Request.PathInfo + "<br>");
Response.Write("<b>Request.PhysicalApplicationPath:</b> " + Request.PhysicalApplicationPath + "<br>");
Response.Write("<b>Request.PhysicalPath:</b> " + Request.PhysicalPath + "<br>");
Response.Write("<b>Request.RawUrl:</b> " + Request.RawUrl + "<br>");
Response.Write("<b>Request.Url.AbsolutePath:</b> " + Request.Url.AbsolutePath + "<br>");
Response.Write("<b>Request.Url.AbsoluteUri:</b> " + Request.Url.AbsoluteUri + "<br>");
Response.Write("<b>Request.Url.Host:</b> " + Request.Url.Host + "<br>");
Response.Write("<b>Request.Url.LocalPath:</b> " + Request.Url.LocalPath + "<br>");
.NET获取URL的各种方式及其区别的更多相关文章
- get方法与post方法的区别与js获取url参数的方式
1.get方法与post方法的区别: 区别一:get重点在从服务器上获取资源,post重点在向服务器发送数据:区别二:get传输数据是通过URL请求,以field(字段)= value的形式,置于UR ...
- javascript获取url参数的方式
方式一: 推荐使用此方式: url链接为:newsDetail.html?id=8a8080e35f90d9fd015f90dac7750001&modelId=123456 var URL ...
- js获取url参数值的方式
定义方法: function getParam(paramName) { paramValue = ""; isFound = false; paramName = paramNa ...
- js获取url中的参数,url中传递中文的时候通过js解码的方式
如果传递的参数是: <a href="${pageContext.request.contextPath}/productdisplay/productDisplay_productD ...
- js获取url參数值的两种方式具体解释
有个url例如以下: http://passport.csdn.net/account/login? from=http%3a%2f%2fwrite.blog.csdn.net%2fpostedit ...
- js获取url参数值的几种方式
一.原生js获取URL参数值: 比如当前URL为:http://localhost:8080/#/page2?id=100&name=guanxy <template> <d ...
- js获取url参数值的两种方式
js获取url参数值的方法有很多,下面也为大家介绍两种. 方法一:正则分析法 function getQueryString(name) { var reg = new RegExp(" ...
- 获取页面URL两种方式
以请求http://localhost:8080/doctor/demo?code=1为例 一:用java代码获取 //获取URL中的请求参数.即?后的条件 code=1 String querySt ...
- php 后台转发和重定向的区别及kohana框架当前url加参数方式
1.重定向是浏览器行为,浏览器地址有变化:转发是后台服务器完成, url地址不变化. 2.kohana获取URL 当前url是http://soyoung.kohana.com/blog/add?id ...
随机推荐
- ceph 性能
mysql在以下设备备份耗时,供大家参考: 备份文件大小 sata用时 ceph用时 nas挂载sata盘用时 7G 1分钟 15G 2分钟 21分钟 47G 8分钟 82分钟 274 ...
- Java 数值计算精度问题
最近刚好做到涉及金额方面的项目,不像普通in,double,floatt类型来修饰,而是用BigDecimal来修饰,就去收集下了这方面的资料,整理如下: 1.float和double只能用来做科学计 ...
- nginx下配置Yii2 rewrite、pathinfo等
环境说明: 我试用的lnmp安装包安装的nginx,nginx版本是1.14.1 server { listen ; server_name www.baidu.com; #access_log /d ...
- MySQL-Xtrabackup备份还原
前言 通常我们都是使用xtrabackup工具来备份数据库,它是一个专业的备份工具,先来简单介绍下它. Xtrabackup percona提供的mysql数据库备份工具,惟一开源的能够对innodb ...
- GNU汇编程序框架
汇编的作用:1.对芯片进行初始化 2. 和C混合编程提升C的运行效率 .section .data < 初始化的数据> .section .bss <未初始化的数据> .sec ...
- 虚拟主机的搭建(ubuntu+apache2)
搭建环境:windows+VMware(Ubuntu)+apache2.(同一IP,不同域名) 1:在VMware的虚拟机Ubuntu下安装apache2(怎么安装百度一下就能找到): 2: apac ...
- CCPC_1005
可怕.....的提.....显而易见的规律活活没照出来...不过说起来却是不能严格证明....于是...脑筋急转弯活活猜不出来..... 1*1->1*2->2*2->2*3-> ...
- Asp.net Mvc Action重定向总结
摘自博客园 程晓晖 [HttpPost] public ActionResult StudentList( string StudName, string studName, DateT ...
- Django 四——ModelForm用法
内容概要: 1.新增数据库表中数据 2.更新数据库表中数据 Django的ModelForm Django中内置了Form和Model两个类,有时候页面的表单form类与Model类是一一对应,因此分 ...
- 了解JavaScript核心精髓(二)
1.字符串操作 //声明字符串 var str = "abcd"; var str = new String("abcd") //截取字符串 console.l ...