DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Stopping Double Submits
Dim sb As New System.Text.StringBuilder()
sb.Append("if (typeof(Page_ClientValidate) == 'function') { ")
sb.Append("if (Page_ClientValidate() == false) { return false; }} ")
sb.Append("this.value = 'Please Wait...';")
sb.Append("this.disabled = true;")
sb.Append(Me.Page.GetPostBackEventReference(Me.btnSubmit))
sb.Append(";")
btnSubmit.Attributes.Add("onclick", sb.ToString())





