-3

Now I have a URL:http://xxx.com:22683/Default.aspx?id=1#para=msg How can I get the part of "para=msg" by using asp.net,not JavaScript?I know that JS can make it.

Thanks.

4

1 回答 1

3

尝试这个

//string id = Request.QueryString["id"];
//string msg =  Request.QueryString["para"]; 
var param1 =
HttpUtility.ParseQueryString(url.Substring(
    new []{0, url.IndexOf('#')}.Max()
)).Get("para");
于 2013-08-05T05:45:35.343 回答