Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Posted
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.

"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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...