取得当前页面的完整URL
1
private string GetPath()
2
{
3
string strPath = "http://" + Request.ServerVariables["HTTP_HOST"] + Request.ServerVariables["PATH_INFO"] + "?" + Request.ServerVariables["QUERY_STRING"];
4
if(strPath.EndsWith("?"))
5
{
6
strPath = strPath.Substring(0, strPath.Length - 1);
7
}
8
return strPath;
9
}
private string GetPath()2
{3
string strPath = "http://" + Request.ServerVariables["HTTP_HOST"] + Request.ServerVariables["PATH_INFO"] + "?" + Request.ServerVariables["QUERY_STRING"];4
if(strPath.EndsWith("?"))5
{6
strPath = strPath.Substring(0, strPath.Length - 1);7
}8
return strPath;9
}


浙公网安备 33010602011771号