Click here to Skip to main content
15,892,674 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to prevent the user clicking two times on a button when it has been already executing and the process is not finished.

I am using Asp.Net framework 2.0 and I have problems when the user clicks two times on a button that is already executing . I want to disable all buttons when the program is executing and enable them again when the process is done.
Posted
Updated 25-Apr-12 19:58pm
v2

in button click write the first line code as

 Button1.Enabled = false;
//put your code here....after executing the code

 Button1.Enabled = true;
 
Share this answer
 
 
Share this answer
 
I've used a from of this successfully, a long time ago:

http://www.abstraction.net/content/articles/preventing%20double%20form%20submit%20in%20asp.net.htm[^]

Don't remember the details, but might give you some insight.
 
Share this answer
 
Comments
[no name] 26-Apr-12 1:42am    
My +5.. It's a good link..
P.Salini 26-Apr-12 2:56am    
Good Link +5.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900