Request 常用請求

 代碼:

 

  1. Response.Write("<br />RawUrl:" + Request.RawUrl); 
  2.             Response.Write("<br />Url:" + Request.Url); 
  3.             Response.Write("<br />UrlReferrer:" + Request.UrlReferrer); 
  4.             Response.Write("<br />Path:" + Request.Path); 
  5.             Response.Write("<br />PhysicalPath:" + Request.PhysicalPath); 
  6.             Response.Write("<br />UserHostName:" + Request.UserHostName); 
  7.             Response.Write("<br />UserHostAddress:" + Request.UserHostAddress); 

 

結果:

  1. RawUrl:/Account/Login.aspx 
  2. Url:http://localhost:1995/Account/Login.aspx 
  3. UrlReferrer: 
  4. Path:/Account/Login.aspx 
  5. PhysicalPath:E:\MYDoc\MyDoc\Visual Studio 2010\Projects\WebApp_Admin\Tianyu_PL9\Account\Login.aspx 
  6. UserHostName:127.0.0.1 
  7. UserHostAddress:127.0.0.1 

 

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