您的位置:首页 > 产品设计 > UI/UE

Request.RawUrl属性,和其它获取url信息的各种方法比较

2010-07-01 09:11 423 查看
Request的RawUrl属性,和其它获取url信息的各种方法比较

测试的url地址是http://www.cnblogs.com/dachie/default.aspx?id=1, 结果如下:
Request.ApplicationPath: /dachie
Request.CurrentExecutionFilePath: /dachie/default.aspx
Request.FilePath: /dachie/default.aspx
Request.Path: /dachie/default.aspx
Request.PathInfo:
Request.PhysicalApplicationPath: E:\WWW\testweb\
Request.PhysicalPath: E:\WWW\dachie\default.aspx
Request.RawUrl: /dachie/default.aspx?id=1
Request.Url.AbsolutePath: /dachie/default.aspx
Request.Url.AbsoluteUri: http://www.cnblogs.com/dachie/default.aspx?id=1
Request.Url.Host: www.cnblogs.com
Request.Url.LocalPath: /dachie/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>");
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: