How to update querystring in C#?

后端 未结 11 1255
野的像风
野的像风 2020-12-02 12:06

Somewhere in the url there is a &sortBy=6 . How do I update this to &sortBy=4 or &sortBy=2 on a button click? Do I need to write custom string functions to creat

11条回答
  •  半阙折子戏
    2020-12-02 12:40

    You can do it clientside with some javascript to build the query string and redirect the page using windows.open.

    Otherwise you can use Response.Redirect or Server.Transfer on the server-side.

提交回复
热议问题