C# 如何捕获整个查询字符串?

C# 如何捕获整个查询字符串?,c#,asp.net,query-string,C#,Asp.net,Query String,我想将所有来自后台的查询字符串捕获到一个字符串中,并作为Response.Redirect(“myPage.aspx?所有查询字符串都在这里”)抛出 我该怎么做?谢谢 这将为您提供原始查询字符串 Request.Url.Query 这将为您提供原始查询字符串 Request.Url.Query 这对我很有用: string redirectURL = "http://www.example.com/myPage.aspx?" + Request.QueryString.ToString();

我想将所有来自后台的查询字符串捕获到一个字符串中,并作为Response.Redirect(“myPage.aspx?所有查询字符串都在这里”)抛出


我该怎么做?谢谢

这将为您提供原始查询字符串

Request.Url.Query

这将为您提供原始查询字符串

Request.Url.Query
这对我很有用:

string redirectURL = "http://www.example.com/myPage.aspx?" + Request.QueryString.ToString(); 
Response.Redirect(redirectURL);
这对我很有用:

string redirectURL = "http://www.example.com/myPage.aspx?" + Request.QueryString.ToString(); 
Response.Redirect(redirectURL);