G
Guest
Hi,
I have a small (hopefully!) problem. I have two buttons on my web page and when button A is clicked, the code behind takes about 3 seconds to execute. While it's executing though, I don't want the user to be able to click button B. What I have found happens is that if user clicks button B while button A is still executing, the code behind button B will start executing straight after the code under A has finished, and there is no page refresh/reload in between the two executions - that is my main problem.
I have searched the web to try to find a solution but have been unsuccessful. Can anyone tell me how I can either make button B disabled in the middle of button A's code execution (so once A is clicked, disable B, refresh the page and continue with execution of code under A), or end all code execution once the code under A has finished (ie do not go on to code under button B if it was pressed)?
Thanks for your help - greately appreciate it,
Jo
I have a small (hopefully!) problem. I have two buttons on my web page and when button A is clicked, the code behind takes about 3 seconds to execute. While it's executing though, I don't want the user to be able to click button B. What I have found happens is that if user clicks button B while button A is still executing, the code behind button B will start executing straight after the code under A has finished, and there is no page refresh/reload in between the two executions - that is my main problem.
I have searched the web to try to find a solution but have been unsuccessful. Can anyone tell me how I can either make button B disabled in the middle of button A's code execution (so once A is clicked, disable B, refresh the page and continue with execution of code under A), or end all code execution once the code under A has finished (ie do not go on to code under button B if it was pressed)?
Thanks for your help - greately appreciate it,
Jo