Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Button1.Attributes.Add("onclick", "DisableButtonStep1()")
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
System.Threading.Thread.Sleep(5000)
Response.Write("Page has been saved.")
End Sub
<script language="javascript">
<!--
function DisableButtonStep1() {
document.forms[0].submit();
window.setTimeout("disableButtonStep2('" + window.event.srcElement.id + "')", 0);
}
function disableButtonStep2(buttonID) {
document.getElementById(buttonID).disabled=true;
}
//-->
</script>