Is there a way to display a java alert before redirecting to another page? I have code that should display an alert and then redirect the user to another page, but the redirect function fires before the alert pops up (if I have the redirect function commented out then the alert shows up just fine but of course the page stays put).
Any ideas?
.
.
.
Dim scriptString As String
scriptString = "<script language=JavaScript> " + Environment.NewLine
scriptString += "alert('Transactions were successfully created!');" + Environment.NewLine
scriptString += "<"
scriptString += "/"
scriptString += "script>"
If Not IsStartupScriptRegistered("Startup"
Then
RegisterStartupScript("Startup", scriptString)
End If
Response.Write(scriptString)
Response.Redirect("main.aspx"
Any ideas?
.
.
.
Dim scriptString As String
scriptString = "<script language=JavaScript> " + Environment.NewLine
scriptString += "alert('Transactions were successfully created!');" + Environment.NewLine
scriptString += "<"
scriptString += "/"
scriptString += "script>"
If Not IsStartupScriptRegistered("Startup"
RegisterStartupScript("Startup", scriptString)
End If
Response.Write(scriptString)
Response.Redirect("main.aspx"