I have one page in which there are two option for search.
Either user click on search button or using querystring.
But when I go from query string and after click on seach button the query string remains as it is.
I want to blank query string on button click.
How to clear querystring.
5 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Krishna GaradRank #191 · 12.8K reputationPosted Feb 24, 2011, 1:54 AM EST
Try this may help you. System.Collections.Specialized.NameValueCollection variables = new System.Collections.Specialized.NameValueCollection(Request.QueryString); if (!string.IsNullOrEmpty(variables["sid"])) variables.Remove("sid"); Response.Write(variables.ToString());PankaJ D147 reputationPosted Feb 24, 2011, 2:11 AM EST
Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Feb 24, 2011, 2:25 AM EST
Just assign null to the query string.
Suthish NairRank #92 · 22.8K reputationPosted Feb 24, 2011, 2:45 AM EST
Attach the code, so we can have a look at the logic you defined.
Suthish NairRank #92 · 22.8K reputationPosted Feb 27, 2011, 7:19 AM EST