Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   how to prevent a page refresh to behave like a submit postback? (http://www.velocityreviews.com/forums/t623430-how-to-prevent-a-page-refresh-to-behave-like-a-submit-postback.html)

Carlos 07-02-2008 01:53 PM

how to prevent a page refresh to behave like a submit postback?
 
Hi all,

I need to know how to prevent to repeat the operations
that happen when the submit button is clicked, when the
page is refreshed.

I noticed that if I refresh my page after the submit button is clicked,
the event is again activated even though I just refreshed the page,
did not push the button again..

Thanks,

Carlos.



Hans Kesting 07-02-2008 02:02 PM

Re: how to prevent a page refresh to behave like a submit postback?
 
on 2-7-2008, Carlos supposed :
> Hi all,
>
> I need to know how to prevent to repeat the operations
> that happen when the submit button is clicked, when the
> page is refreshed.
>
> I noticed that if I refresh my page after the submit button is clicked,
> the event is again activated even though I just refreshed the page,
> did not push the button again..
>
> Thanks,
>
> Carlos.


What I sometimes use is this: after the submit action has completed,
issue a redirect to the (same) page. This will force an extra
roundtrip, but the browser "forgets" about that post-action (the
submit).

Hans Kesting



Carlos 07-02-2008 02:20 PM

Re: how to prevent a page refresh to behave like a submit postback?
 
Thank you so much Hans for your prompt reply.

Carlos.

"Hans Kesting" <news.hansdk@spamgourmet.com> wrote in message
news:%237NbVuE3IHA.4284@TK2MSFTNGP04.phx.gbl...
> on 2-7-2008, Carlos supposed :
>> Hi all,
>>
>> I need to know how to prevent to repeat the operations
>> that happen when the submit button is clicked, when the
>> page is refreshed.
>>
>> I noticed that if I refresh my page after the submit button is clicked,
>> the event is again activated even though I just refreshed the page,
>> did not push the button again..
>>
>> Thanks,
>>
>> Carlos.

>
> What I sometimes use is this: after the submit action has completed, issue
> a redirect to the (same) page. This will force an extra roundtrip, but the
> browser "forgets" about that post-action (the submit).
>
> Hans Kesting
>
>





All times are GMT. The time now is 11:11 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.