After clicking on the Insert
button, it performs its intended action. However, I want to prevent users from clicking the button multiple times by disabling it after it has been pressed.
<asp:Button ID="Insert" runat="server" Text="Send" OnClick="Insert_OnClick"
OnClientClick="this.disabled=true; showLoading(this);" />
When using both Insert_OnClick
and "disable
", the function Insert_OnClick
does not execute because the button is disabled first, preventing the code-behind function from running.
I attempted to disable the button itself within the showLoading
JavaScript function, but encountered the same issue.
Does anyone have a solution for ensuring that the code-behind function runs even when the button is disabled?