after click refresh

A

Alexander Widera

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
 
N

Niraj Ranka

Hello,

Actually Response.Redirect will be better option to reload the page itself.
As u can maintaing all the parameters of the url here.

Regards,
Niraj Ranka
"Alexander Widera"
 
H

Hans Kesting

Alexander said:
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
 
A

Alexander Widera

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
 
A

Alexander Widera

and one more problem:

the onclick event comes from a rewritten-url ... e.g.
/en/mypage/default.aspx ... but if i use
Response.Redirect(Request.Url.ToString()) then the Url is e.g.
/default.aspx?lang=en&page=mypage

How can I get the Url which is displayed in the browser-location-bar?

Thanks for help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top