Author: b007 | Posted on: 5/15/2010 6:33:19 PM | Views : 390

Hi,
Should I use Session to check if user is LoggedIn?

if(Convert.ToBoolean(Session["LoggedIn"]) ==true) 
{
// then they can see the page
}
else
{
Response.Redirect("can'tsee.html");
}
- Should I Put this Code in each secure Page on Page_Load?
- Where Should I set it: Session["LoggedIn"] = True (After User Is login to Site)?
- What use do I have to the Cookie:
FormsAuthentication.SetAuthCookie(Login1.UserName, Login1.RememberMeSet);and How it do the Re-login to site without needs to enter User/Password and what happen with the Session["LoggedIn"]?
Thanks..



...

Go to the complete details ...