itagraham Posted May 4, 2006 Posted May 4, 2006 When an event is executed (e.g. command button) and the code behind begins to be carried out; how can I stop the user from clicking a second time cancelling the process? Is there code to say, if in midst of an event and a new event is triggered either, put it into a queue or ignore it? Another answer I was toying with was to immediately disable the buttons and on page load executing the specific module relating to the original intended event. Would this be advisable or am I running into problems? If anyone could add comment I would be greatful. Many thanks Quote
Arch4ngel Posted May 4, 2006 Posted May 4, 2006 When an event is executed (e.g. command button) and the code behind begins to be carried out; how can I stop the user from clicking a second time cancelling the process? Is there code to say, if in midst of an event and a new event is triggered either, put it into a queue or ignore it? Another answer I was toying with was to immediately disable the buttons and on page load executing the specific module relating to the original intended event. Would this be advisable or am I running into problems? If anyone could add comment I would be greatful. Many thanks The answer lies in the Javascript my friend. Just disable the button on the OnClick client event. That's it. But if you are looking for a server-way to just accept only one request, you need a flag. Quote "If someone say : "Die mortal !"... don't stay to see if he isn't." - Unknown "Learning to program is like going out with a new girl friend. There's always something that wasn't mentioned in the documentation..." - Me "A drunk girl is like an animal... it scream at everything like a cat and roll in the grass like a dog." - Me after seeing my girlfriend drunk and some of her drunk friend. C# TO VB TRANSLATOR
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.