Set A Parameter Without Redirecting A Page?

  • Thread starter Thread starter pbd22
  • Start date Start date
P

pbd22

can somebody tell me how to set a parameter of my current URL

without using response.redirect?

I am trying to set a parameter - ResponseId = 4 inside a while loop. is
this possible?

also, is it possible to replace the value of the ResponseId parameter
to, say "5" in the same way?

thanks!
 
Querystring parameters cannot be reset dynamically as they represent a
read-only collection of items in the url.

Of course, something else you could do would be to have a series of local
variables or protected properties that would initially populate from this
list, then change the variable in postback. This would work nicely if you're
using AJAX because then you wouldn't be posting back the whole page. If
you're not using AJAX, then using a response.redirect doesn't effect you
much because you'll have a full page postback and might as well do the
redirect to avoid worrying about keeping parameter updates in a viewstate.
 
ok, thanks mark.

i dont think this will work as the updated parameter is created in a
while
loop that outputs many values - this is a count.

what i have done is pass my url querystring through a hidden iframe
from
the referring page (i am uploading files). now, what i want to do is
send a
count back to the referring page (the count represents upload time). i
thought i might be able to do this in the querystring but this would
cause
numerous postbacks in sequence - not pretty.

since it looks like doing it via the querystring is a no-go, do you
have any ideas how
i might send the upload count back to the referring page? is it
possible to send an ajax response from the server when the client does
not initiate the call?

thanks.
peter
 
Back
Top