Disable Button Double Click in ASP.NET
Add following code to Page_load. This code prevents button double-click on client-side but still executes code at server-side:
C#
btnNew.Attributes.Add("onclick", " this.disabled = true; " + ClientScript.GetPostBackEventReference(btnNew, null) + ";");
VB.Net
btnNew.Attributes.Add("onclick", " this.disabled = true; " + ClientScript.GetPostBackEventReference(btnNew, Nothing) + ";")
Nice one. Thanks :)
ReplyDeleteThanks
ReplyDeleteExcellent.. Thanks
ReplyDeleteThank You
ReplyDelete