开发者

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 disabled

Currently have

<asp:Button ID="btnProceedStepTwo" runat="server" Text="Proceed &nbsp;&rarr;" 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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜