Note
Oh, one last point. You
do not have to use the
FormsAuthentication.RedirectFromLogin line of code in your application(s).
Use
Response.Redirect, if my method is causing an issue.
It is the logic and understanding that matters, not so much the method you use to get there.
Originally Posted by leTus
Ok, I was reading and I don't know if I got this right but millers_35 if your problem is that you get redirected to default.aspx even if you didn't come from there here is what I found:
This is what everybody has in their Login.aspx
FormsAuthentication.RedirectFromLoginPage(txtUserName.Text, false);
But the RedirectFromLoginPage works right if you pass the "ReturnUrl" parameter otherwise it will redirect you to Default.aspx everytime you entered the right username and password.
This should be in the page you want to protect. In this case the page name is TestDetails.aspx
if (Session["Logged_IN"].Equals("No"))
{
Response.Redirect("../Members/Login.aspx?ReturnUrl=/mdb/Admin/TestDetails.aspx");
}
the code is in C# sorry no time to change.