Let’s assume an aspx page gets multiple querystrings, for example books.aspx?author=Arthor&level=4&year=2004.
I’d like to create a button that clears specific querystring.
For example when clearAuthorBtn is clicked, user should be redirected to books.aspx?level=4&year=2004
How can I make it?
Thank you very much.
Here is a method that may help. I have not tested this particular implementation, but something like it should suffice (and be fairly robust).
You can call the above method like this (note that I use HttpContext.Current in case you want to call this outside of an
PageorUserControl):