I have two button in my page and I am using the below code and I am just wondering if there is a way to wire the two buttons together and when I click one of them I want both to be disabled and show "processing please wait..." message. thank you for the help
Code:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
btnSelect.Attributes.Add("onclick", ClientScript.GetPostBackEventReference(btnSelect, "") _
& ";this.value='Processing Please wait...';this.disabled = true;this.style.backgroundColor = '';")
Button2.Attributes.Add("onclick", ClientScript.GetPostBackEventReference(Button2, "") _
& ";this.value='Processing Please wait...';this.disabled = true;this.style.backgroundColor = '';")
lblError.Visible = False
If Not IsPostBack Then
LetBind()
lblTody.Text = Servertime.CurrentTime
End If
BindData()
End Sub
Protected Sub btnSelect_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSelect.Click, Button2.Click
System.Threading.Thread.Sleep(1000)
ClientScript.RegisterClientScriptBlock(Me.GetType, _
"reset", "document.getElementById('" & btnSelect.ClientID & "').disabled=false;", True)
ClientScript.RegisterClientScriptBlock(Me.GetType, _
"reset", "document.getElementById('" & Button2.ClientID & "').disabled=false;", True)