Request的RawUrl屬性,和其它獲取url信息的各種方法比較


測試的url地址是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

 

Request的RawUrl屬性,和其它獲取url信息的各種方法比較 - rachel - 尋找影子的螞蟻             Response.Write("<b>Request.ApplicationPath:</b> " + Request.ApplicationPath + "<br>");

Request的RawUrl屬性,和其它獲取url信息的各種方法比較 - rachel - 尋找影子的螞蟻             Response.Write("<b>Request.CurrentExecutionFilePath:</b> " + Request.CurrentExecutionFilePath + "<br>");

Request的RawUrl屬性,和其它獲取url信息的各種方法比較 - rachel - 尋找影子的螞蟻             Response.Write("<b>Request.FilePath:</b> " + Request.FilePath + "<br>");

Request的RawUrl屬性,和其它獲取url信息的各種方法比較 - rachel - 尋找影子的螞蟻             Response.Write("<b>Request.Path:</b> " + Request.Path + "<br>");

Request的RawUrl屬性,和其它獲取url信息的各種方法比較 - rachel - 尋找影子的螞蟻             Response.Write("<b>Request.PathInfo:</b> " + Request.PathInfo + "<br>");

Request的RawUrl屬性,和其它獲取url信息的各種方法比較 - rachel - 尋找影子的螞蟻             Response.Write("<b>Request.PhysicalApplicationPath:</b> " + Request.PhysicalApplicationPath + "<br>");

Request的RawUrl屬性,和其它獲取url信息的各種方法比較 - rachel - 尋找影子的螞蟻             Response.Write("<b>Request.PhysicalPath:</b> " + Request.PhysicalPath + "<br>");

Request的RawUrl屬性,和其它獲取url信息的各種方法比較 - rachel - 尋找影子的螞蟻             Response.Write("<b>Request.RawUrl:</b> " + Request.RawUrl + "<br>");

Request的RawUrl屬性,和其它獲取url信息的各種方法比較 - rachel - 尋找影子的螞蟻             Response.Write("<b>Request.Url.AbsolutePath:</b> " + Request.Url.AbsolutePath + "<br>");

Request的RawUrl屬性,和其它獲取url信息的各種方法比較 - rachel - 尋找影子的螞蟻             Response.Write("<b>Request.Url.AbsoluteUri:</b> " + Request.Url.AbsoluteUri + "<br>");

Request的RawUrl屬性,和其它獲取url信息的各種方法比較 - rachel - 尋找影子的螞蟻             Response.Write("<b>Request.Url.Host:</b> " + Request.Url.Host + "<br>");

Request的RawUrl屬性,和其它獲取url信息的各種方法比較 - rachel - 尋找影子的螞蟻             Response.Write("<b>Request.Url.LocalPath:</b> " + Request.Url.LocalPath + "<br>");


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM