I need a pop up to show in a button click statement right before a redirect. How can I do this? VS 2005 / .NET 2.0.
Sub MyButton_Click...
' Do stuff
' Display pop-up , wait for user to click 'OK'
Response.Redirect("newpage.aspx");
End Sub
I need a pop up to show in a button click statement right before a redirect. How can I do this? VS 2005 / .NET 2.0.
Sub MyButton_Click...
' Do stuff
' Display pop-up , wait for user to click 'OK'
Response.Redirect("newpage.aspx");
End Sub
Ok, that code will run on the server - the server simply can't display dialogs directly on the client, but can generate client-side script that will do so.
Code:Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load ''' Or something like that - C#'r... myButton.Attributes.Add("onclick", "alert('Some message'); return true;") End Sub Sub MyButton_Click(sender As Object, e As EventArgs) Response.Redirect("newpage.aspx") End Sub