Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stop command button from being clicked twice
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 3.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01408368
Message ID:
01408381
Vues:
39
I found this doing a Google search:

http://www.asp101.com/tips/index.asp?id=135



>Hello all,
>
>I have a web application form that adds a record to the database based on values entered on the form. There is a 'Add' button on this form which launches the save process which validates the entered values, adds the record to the database and refreshes the same form with all values left as they were with the exception of two fields being cleared out.
>
>Now, if the user clicked 'Add' again following the refresh of the form, the validation routine would report back an error since the two fields that were cleared are required to be entered.
>
>However, if the user clicks 'Add' followed by a second click of this button before the screen is refreshed, two identical records are added. This is obviously not desired behavior. My question is how can I prohibit this consecutive click on this button.
>
>This reminds of when you are purchasing something on the web using a credit card and there is a warning that says to not click Submit again (while you are waiting for it to process) as you may be charged twice. I would ask that there be no suggestions that putting this warning is the answer to this problem. :)
>
>TIA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform