比如:test.aspx?p1=1
我现在不知道p1是多少
可以根据Page.Request.QueryString[0]来反向获得他( "p1 ")吗?
------解决方案--------------------------------------------------------
http://dotnet.aspx.cc/article/e6e35e3c-2c28-4dad-acbb-db78d2785776/read.aspx
------解决方案--------------------------------------------------------
public virtual string UrlQueryString()
{
string strQueryString = String.Empty;
foreach (String s in Request.QueryString.AllKeys)
{
strQueryString = strQueryString + "& " + s + "= " + Request.QueryString[s].ToString();
}
return strQueryString;
}
用这个方法吧,能够得到参数及参数的值