ASP.NET Looking to disable Button on click event
Hey looking for method to disable button after clicked, but I guess only after it passes validation because need to enter a second time.
EDIT :
Looking开发者_C百科 for a disable function which does the following
1) Disables the button onclick 2) when a user hits the back button in the browser the button is no longer disabledCurrently have
<asp:Button ID="btnProceedStepTwo" runat="server" Text="Proceed →" CssClass="button" OnClick="btnProceedTwo_Click" />
and in code behind
btnProceedStepTwo.Attributes.Add("onclick", "this.disabled=true;" + GetPostBackEventReference(btnProceedStepTwo).ToString());
You can disable submit button before page postback. Here is a link describing use of javascript to do so: Disable Button before Page PostBack in ASP.Net
精彩评论