Reputation: 79
I have a program that on button click pops an alert message. Whenever the message pops up and I click OK, the message pops up again. Does anyone know why this might be happening? Here is my code:
If MyDataTable.Rows.Count = 0 Then
Response.Write("<script language=""javascript"">alert('Order # does not exist!');</script>")
Else
Response.Write("<script language=""javascript"">alert('Order updated!');</script>")
OrderTextEditor.Text = ""
TypeTextEditor.Text = ""
End If
Thanks in advance for your responses.
Upvotes: 1
Views: 369
Reputation: 77
Did you try:
Dim myScript As String = "window.alert('There is a problem');"
ClientScript.RegisterStartupScript(Me.GetType(), "myScript", myScript, True)
Upvotes: 1