Over a million developers have joined DZone.

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())
Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}