Avoid click of a button twice
This is a very common requirement that the user should not click on the button twice while submitting. The best option to use the below code on the page load
PostBackOptions pbOptions = new PostBackOptions(btnSave);
btnSave.OnClientClick = "this.disabled = true; this.style.cursor='wait';";
btnSave.OnClientClick += Page.ClientScript.GetPostBackEventReference(pbOptions);
If you are using a Image button, instead of this use the document.getElementById('ctl00_btnSave')
Hope this helps..
Cheers!!!
PostBackOptions pbOptions = new PostBackOptions(btnSave);
btnSave.OnClientClick = "this.disabled = true; this.style.cursor='wait';";
btnSave.OnClientClick += Page.ClientScript.GetPostBackEventReference(pbOptions);
If you are using a Image button, instead of this use the document.getElementById('ctl00_btnSave')
Hope this helps..
Cheers!!!
Comments