














Response.Write(Request.Url.GetLeftPart(System.UriPartial.Authority));
这个能获取到uri部分即: http://www.goudiannao.com
http://www.goudiannao.com/root/sub/abc.aspx
root是虚拟目录名,sub是子目录,abc.aspx是文件名
想等得到全部
Request.Url.AbsoluteUri
想得到http://localhost
Request.Url.GetLeftPart(System.UriPartial.Authority)
想得到/root
Request.ApplicationPath
想得到/root/sub/abc.aspx
Request.RawUrl
Request.Url.AbsolutePath
想得到
www.goudiannao.comRequest.Url.Authority
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。