473,396 Members | 1,915 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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.
Jul 2 '08 #1
2 3145
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
Jul 2 '08 #2
Thank you so much Hans for your prompt reply.

Carlos.

"Hans Kesting" <ne*********@spamgourmet.comwrote in message
news:%2****************@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


Jul 2 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: anonieko | last post by:
Scenario: You have a page that is TOO slow to refresh. But it allows partial flushing of html contents. I.e. Submit button already appears but you don't want your users to click on it prematurely...
5
by: Bill Cohagan | last post by:
I'm constructing an ASP app with a frameset on the home html page. From frame A I need to referesh the page in frame B when a button click occurs on a button in Frame A (server side event handler)....
3
by: Rob | last post by:
Each time a webform is posted back (submitted), another URL is added to the browser's history list. My web application allows a back button to return to previously visited pages, but I do not wish...
4
by: D. Shane Fowlkes | last post by:
This may be a very simple question but I'm stumped none the less. I have a form where a user provides comments. There's a Grid below this form which displays all comments in the table so far. On...
5
by: Jeronimo Bertran | last post by:
I have a DataGrid that gets filled based on a filter which is defined by the values that the user selects on several controls. When the page postbacks after changing the selection on the filter...
1
by: Ibrahim. | last post by:
Hi, I have a login page, the problem I'm facing is like this; 1. Login page with submit button (being default button); 2. When first time the page is submitted then submit code is called. ...
1
by: mgonzales3 | last post by:
I have a popup that does a postback to populate a listbox. on my content page I want to fire a jscript that will refresh the parent on the unload. the code on the content page looks like this. ...
2
by: Doogie | last post by:
Hi, I'm trying to set up a refresh of some of the data on a page and am using this: <meta http-equiv="refresh" content="120"> This works great with one exception. I only want to refresh...
4
by: Dan | last post by:
Hi, i'm not sure to understand the difference between refreshing the pagina by clicking on 'refresh' in the browser and a postback. What i think it is: Suppose a page with a form containing a...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.