Get full query string in C# ASP.NET

后端 未结 6 1543
死守一世寂寞
死守一世寂寞 2020-12-29 19:30

As a PHP programmer I\'m used to using $_GET to retrieve the HTTP query string... and if I need the whole string, theres loads of ways to do it.

In ASP however, I c

6条回答
  •  借酒劲吻你
    2020-12-29 19:53

    This should work fine for you.

    Write this code in the Page_Load event of the page.

    string ID = Request.QueryString["id"].ToString();
    Response.Redirect("http://www.example.com/rendernews.php?id=" + ID);
    

提交回复
热议问题