首页 > Web开发 > 详细

.NET获取URL的各种方式及其区别

时间:2017-07-13 09:59:46      阅读:334      评论:0      收藏:0      [点我收藏+]

原文发布时间为: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的各种方式及其区别

原文:http://www.cnblogs.com/handboy/p/7158350.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!