我在asp.net中有回复表格。我想在发送按钮上点击按钮文字应该从发送到请等待&一旦发送它应该回到它的默认值文本'发送'。任何人都可以帮忙吗?
代码
Protected Sub submit_client_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles submit_client.Click
Try
Dim pattern As String
pattern = "^([0-9a-zA-Z]([-\.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$"
If Regex.IsMatch(TextBox3.Text, pattern) Then
Label2.Text = ""
Else
Label2.Text = "Not a valid Email address "
End If
Dim emails As New List(Of String)()
generate.Visible = True
clear.Visible = True
SendHTMLMail()
'For Each item As ListViewItem In lvCustomers.Items
' Dim ck As CheckBox = DirectCast(item.FindControl("CheckBox1"), CheckBox)
' If ck.Checked Then
Catch ex As Exception
Response.Write(ex)
End Try
End Sub
答案 0 :(得分:0)
尝试这样:
MyButton.Text="Sending"
SendHTMLMail()
Thread.Sleep(3000) // add this & remove SendHTMLMail() for testing
MyButton.Text="Send"