Re: Disable submit button once it is clicked.

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Clickety-Click Clickety-Click
Mark's solution was really slick.

<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/


"Mark Rae [MVP]" <mark@xxxxxxxxxxxxxxxxx> wrote in message
news:OBFUJgVSIHA.4684@xxxxxxxxxxxxxxxxxxxxxxx
"zlf" <zlfcn@xxxxxxxxxxx> wrote in message
news:uYEB60USIHA.4740@xxxxxxxxxxxxxxxxxxxxxxx

How to disable button once it is clicked on the page? The codes in click
event of submit button is time-costing(about 4-5 secs), in this period,
user maybe do a re-submit, that is not expected.

<asp:Button ID="cmdSubmit" runat="server" Text="Submit"
OnClick="cmdSubmit_Click" OnClientClick="this.disabled=true;" />


--
Mark Rae
ASP.NET MVP
http://www.markrae.net


.


Quantcast