Net获取当前的URL

 

复制代码
private string GetFullUrl()
{
string Url= "http://" + Request.ServerVariables["HTTP_HOST"] + Request.ServerVariables["PATH_INFO"] + "?" + Request.ServerVariables["QUERY_STRING"];
if (Url.EndsWith("?"))

{
Url= Url.Substring(0, Url.Length - 1);
}
return Url;
}
复制代码



posted @   EasyPass  阅读(161)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示