I have the following problem:
- the onclick is fired (and the page reloads) ...
- the default(-template-)page begins to load ....
- it loads an unsercontrol ...
- in it is the function for handling the onclick-event
- the function manipulates an value of an object of a self-created-class
- the new value should be displayed on the current page ... BUT ...the
output of the value is in an other usercontrol, and this control is loaded
before the control of the click-handling usercontrol...
- and so the value stays the old ... only after an refresh (without
resending) the value is the correct (new) one
and that is the problem i think ...
but if i change the order of the usercontrols the same effect occurs... i
dont know why ...
if i place a Response.Redirect(Request.Url.ToString()) then it works ...
but
.... it's not the fine way ...
Does somebody knows more about my problem?
Thanks
"Hans Kesting" <ne***********@spamgourmet.com> schrieb im Newsbeitrag
news:uS**************@TK2MSFTNGP12.phx.gbl...
Alexander Widera wrote: hi,
i have a button... after a click on it a function is called ... in it
it is done something and it is needed to reload the page now... how
can i reload a page? with Response.Redirect ? or is there a better
solution? what are the parameters, that exactly the called url is
refrehed (including the querystring)
thanks
alex
If you change values in the onClick event or in PreRender then you don't
have to do anything. The page will re-show itself if you don't redirect
away
from it.
One warning: if the user then "refreshes" the page, he will
a) receive a client-side warning about resubmitting values
b) execute the onClick again.
Hans Kesting