I used something similar when using asp:Button to send:
1) Set the submit button UseSubmitBehavior="false"
2) Set the submit button OnClientClick="pleaseWait(this, 'Please Wait...');"
3) Include javascript code on the page:
function pleaseWait(obj, message) { if (typeof(Page_ClientValidate) == 'function') { if (Page_ClientValidate()) { obj.disabled = true; obj.value = message; return true; } } return false; }
This solution is good because it is simple, but still allows for client-side validation of javascript. This is not ideal, because it still relies on Javascript which can be turned off, but it is unlikely to be done by those who do not make sense to click once and wait for an answer. :)
source share