Disable a button on click
Posted
by Hitz
on Stack Overflow
See other posts from Stack Overflow
or by Hitz
Published on 2009-05-08T16:41:09Z
Indexed on
2010/03/16
19:01 UTC
Read the original article
Hit count: 230
I have a button control. Once the user clicks on it, the click event should fire and then the button should get disabled. How can I do this? I have the option to use JQuery or JavasSript or both.
Here is my button declaration:
<asp:Button
ID="Button1"
runat="server"
Text="Click Me"
onclick="Button1_Click"
/>
On the button click code behind, I have added a Response.Write(). That should get executed and then the button should be disabled
© Stack Overflow or respective owner