How can I prevent the user from double-clicking a button? I have been searching the internet and nothing works for me in my project. Can you give me examples?
I've this and doesn't work
<script type = "text/javascript">
function DisableButton() {
document.getElementById("<%=Button1.ClientID %>").disabled = true;
}
window.onbeforeunload = DisableButton;
</script>