【问题标题】:How to capture the whole query string?如何捕获整个查询字符串?
【发布时间】:2011-05-27 19:31:21
【问题描述】:

我想将来自后端页面的所有查询字符串捕获到一个字符串中并作为 Response.Redirect("myPage.aspx?ALL Query String Goes Here") 抛出。

我该怎么做?谢谢!

【问题讨论】:

    标签: c# asp.net query-string


    【解决方案1】:

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

    Request.Url.Query
    

    【讨论】:

      【解决方案2】:

      这对我有用:

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

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2011-02-21
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2014-10-18
        • 1970-01-01
        相关资源
        最近更新 更多