Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > after click refresh

Reply
Thread Tools

after click refresh

 
 
Alexander Widera
Guest
Posts: n/a
 
      10-18-2005
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


 
Reply With Quote
 
 
 
 
Niraj Ranka
Guest
Posts: n/a
 
      10-18-2005
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"
<> wrote in
message news:%...
> 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
>



 
Reply With Quote
 
 
 
 
Hans Kesting
Guest
Posts: n/a
 
      10-18-2005
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


 
Reply With Quote
 
Alexander Widera
Guest
Posts: n/a
 
      10-18-2005
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" <> schrieb im Newsbeitrag
news:...
> 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
>
>




 
Reply With Quote
 
Alexander Widera
Guest
Posts: n/a
 
      10-18-2005
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


"Hans Kesting" <> schrieb im Newsbeitrag
news:...
> 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
>
>




 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cant access TreeView Node frm Btn Click event after populating frm another click even chandrajit_in ASP .Net 0 01-03-2008 10:45 AM
click click click Andy Morrison Computer Support 7 12-20-2007 06:50 AM
When user press F5 after a button click event, the click event fires again! Max2006 ASP .Net 2 09-19-2007 05:37 AM
Datalist selects Item after first click, but does apply the SelectedItemTemplate after the second click only Dirk Meusel ASP .Net 1 08-19-2003 09:56 AM
Problem with refresh button breaking automatic refresh brian lanning ASP .Net 0 07-29-2003 07:57 PM



Advertisments