Hello All,
I want to redirect to some other directory page after displaying JavaScript alert message in ASP.net in a page.
For that I tried bellow code in our application ~/Profile/MyProfile.aspx.cs file
string redirectTo = "~/Logins/Login.aspx"; //The page I wish to redirect to.
string script = "<script>"; //Begin Script tag
script += "alert('" + ui_lblError.Text + "');"; //Javascript Alert box
script += "window.location='" + redirectTo + "'</script>"; //Redirect to the page specified above.
RegisterStartupScript("startup", script);
This is displaying alert message but not redirecting the login page. This also happning duto wrong file path.
Please let me know how do I manipulate the path.
Thanks in advance.
Regards,
Anupam
Anupam_jana@yahoo.com