I have an image button on my aspx page, for example:
<asp:ImageButton ID="btnProcessPayment" ImageUrl="~/Images/process-payment.png" OnClientClick="return disableButton(this);" runat="server" OnClick="btnProcessPayment_Click" />
This is my javascript function:
function disableButton(button) { button.disabled = true; return true; }
As you can see in the javascript event handler, I disabled the button so that the user doesn't click the button twice. However, even my server-side event handler does not start because of this. What am I doing wrong?
Note: If I comment on this line button.disabled = true; , everything will be fine.
source share