The collection is readonly which means you can't modify it. Not at all - not
directly or indirectly.
The querystring can't be controlled from within the code, because by the
time your code fired it is already passed to you. This makes perfect sense
if you think about it <g>...
I'm guessing you want to modify the URL of the page? The only way to do this
is to Redirect to another page or possibly using some client script to
modify the Location. ASP.Net always posts back to the same URL and you
cannot change that from the server side...
+++ Rick ---
--
Rick Strahl
West Wind Technologies
http://www.west-wind.com/ http://www.west-wind.com/weblog/
----------------------------------
Making waves on the Web
"A.M" <no*****@online.nospam> wrote in message
news:Of**************@TK2MSFTNGP11.phx.gbl...
Hi,
When I call
Request.QueryString.Clear();
ASP.NET throws me this exception:
Exception Details: System.NotSupportedException: Collection is read-only
If the collection is read-onle, then why there is a Clear() method?
If I can not call Clear() methid in certain phases of QueryString's life
time, then how can I remove items from QueryString during postbacks?
Thanks,
Alan