User double clicks submit button causing double postback of data. How can I stop this happening?

Posted on 2004-11-05
Medium Priority
Last Modified: 2008-02-01

I am using a server side submit button and if you double click the button twice it writes two lots of data back to the server. How can I overcome this. It dosent happen often but often enough to cause me a headache.

Your help would be greatly appreciated.


Paul G
Question by:pgilfeather
LVL 37

Accepted Solution

gregoryyoung earned 672 total points
ID: 12506800
There are many ways of doing this ... assigning a GUID to the request so it does not get double is a generally accepted one, you can also set a variable in session.

You can also use javascript on the button which disables it after the first click.
LVL 20

Assisted Solution

ihenry earned 664 total points
ID: 12507030

In addition for gregory's suggestion on javascript, take a loot at the two articles below

Assisted Solution

srcalc earned 664 total points
ID: 12515671
yea the easiest way to fix this is simply disable the button after it is clicked

Author Comment

ID: 12523889
Thanks guys Im looking into the links.

Will return shortly

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses
Course of the Month16 days, 6 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question