当前位置: 首页 > news >正文

.net 获取url的方法

测试的url地址是http://www.gkxsn.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.gkxsn.com/testweb/default.aspx?id=1
Request.Url.Host: www.gkxsn.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>");

相关文章:

  • STM32F030 BootLoader与应用程序的跳转设置
  • 给自定义控件.ascx文件传参数并传值 ,让你定义的控件可用性更大
  • Bootstrap支持的JavaScript插件
  • 1+1=2的 blog 文章索引
  • Codeforces Round #407 div2 题解【ABCDE】
  • FixTableHeader
  • HTML基础3(列表,块,布局)
  • 用gcrawler进行多级页面并发下载的例子
  • 01煤球数目(数字填空)
  • 黑盒测试-决策表法
  • 选中行的索引: tr onclick=alert(this.rowIndex)
  • 09使用后置处理器正则表达式将接口返回值传给另一个接口;
  • PHP大文件分割上传(分片上传)
  • 一行代码完美解决fireFox,opera的页面居中对齐问题
  • outlook关联qq邮箱失败显示503错误
  • ES6指北【2】—— 箭头函数
  • Angular js 常用指令ng-if、ng-class、ng-option、ng-value、ng-click是如何使用的?
  • Consul Config 使用Git做版本控制的实现
  • java2019面试题北京
  • Java读取Properties文件的六种方法
  • Less 日常用法
  • node入门
  • python 学习笔记 - Queue Pipes,进程间通讯
  • Python_OOP
  • Quartz初级教程
  • React的组件模式
  • Selenium实战教程系列(二)---元素定位
  • 阿里云爬虫风险管理产品商业化,为云端流量保驾护航
  • 动态魔术使用DBMS_SQL
  • 关于springcloud Gateway中的限流
  • 记录一下第一次使用npm
  • 解析 Webpack中import、require、按需加载的执行过程
  • 两列自适应布局方案整理
  • 使用 @font-face
  • ​软考-高级-系统架构设计师教程(清华第2版)【第15章 面向服务架构设计理论与实践(P527~554)-思维导图】​
  • ​业务双活的数据切换思路设计(下)
  • ### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException
  • #我与Java虚拟机的故事#连载11: JVM学习之路
  • $(document).ready(function(){}), $().ready(function(){})和$(function(){})三者区别
  • (cljs/run-at (JSVM. :browser) 搭建刚好可用的开发环境!)
  • (Pytorch框架)神经网络输出维度调试,做出我们自己的网络来!!(详细教程~)
  • (Redis使用系列) Springboot 使用Redis+Session实现Session共享 ,简单的单点登录 五
  • (八)Flask之app.route装饰器函数的参数
  • (附源码)python房屋租赁管理系统 毕业设计 745613
  • (论文阅读11/100)Fast R-CNN
  • (算法设计与分析)第一章算法概述-习题
  • (一)python发送HTTP 请求的两种方式(get和post )
  • (原)本想说脏话,奈何已放下
  • (原创)boost.property_tree解析xml的帮助类以及中文解析问题的解决
  • .equals()到底是什么意思?
  • .NET Framework .NET Core与 .NET 的区别
  • .net和jar包windows服务部署
  • @KafkaListener注解详解(一)| 常用参数详解
  • @Resource和@Autowired的区别
  • [20150904]exp slow.txt