Hello, I am encountering an issue with a submit button on my page. I want the user to be prompted with a message saying "Are you sure to submit that page really" when the submit button is clicked, and if they click yes, then it should redirect to another page. I have tried using the following code:
RegisterStartupScript("myAlert", "<script>alert('Are you sure about to submit the test?')</script>");
Response.Redirect("Result.aspx");
However, the page is being redirected without showing the prompt message to the user. How can I make this work properly? Using Asp.net c#.