取本頁URL地址的方法是[轉]

測試的url地址是http://www.test.com/testweb/default.aspx, 結果如下:

Request.ApplicationPath
  結果:/testweb
Request.CurrentExecutionFilePath:
  結果:testweb/default.aspx
Request.FilePath:
  結果:/testweb/default.aspx
Request.Path:
  結果:/testweb/default.aspx
Request.PhysicalApplicationPath:
  結果:E:/WWW/testweb/
Request.PhysicalPath:
  結果:E:/WWW/testweb/default.aspx
Request.RawUrl:
  結果:/testweb/default.aspx
Request.Url.AbsolutePath:
  結果:/testweb/default.aspx
Request.Url.AbsoluteUri:
  結果:http://www.test.com/testweb/default.aspx
Request.Url.Host:
  結果:www.test.com
Request.Url.LocalPath:
  結果:/testweb/default.aspx

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章