I am making a web page in C# and want to show a message box for 5 seconds and redirect the user to login.aspx if the entered information is true.
I have a register page and the user will try to register (email, username and password are required). I have a string Answer that if the entered information is ok, the value of the string is "OK" else "notOk".
So, how to add a message box telling "You have registered successfully" and after 5 seconds, close the message box and redirect it to login.aspx if string Answer = "OK"?
EDIT: I found this SITE here, it was very helpful. If anyone is interested in @LordTakkera 's last answer, this SITE explains how to call scripts.
After registration has been successfully completed in server-side code, redirect to success.aspx which displays "You have registered successfully" to the user and has the following script in the markup:
<script>
setTimeout(function() { window.location = "login.aspx"; }, 5000);
</script>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With