Here’s the scenario – let’s say you have an Insert subroutine, called ‘doInsert’.
You want to immediately disable the Submit button, so that the end-user won’t click it
multiple times, therefore, submitting the same data multiple times.
For this, use a regular HTML button, including a Runat=”server” and an ‘OnServerClick’
event designation – like this:
<INPUT id=”Button1″ onclick=”document.form1.Button1.disabled=true;” type=”button”
value=”Submit – Insert Data” name=”Button1″ runat=”server”
onserverclick=”doInsert”>
Then, in the very last line of the ‘doInsert’ subroutine, add this line:
Button1.enabled=”True”