Response.AppendHeader("Refresh", Convert.ToString((Session.Timeout * 60) - 3) + "; URL=Login.aspx");
<authentication mode="Forms"> <forms loginUrl="login.aspx" defaultUrl="homePage.aspx" timeout="yourTime" name="UserLogin" path="/"/> </authentication>
FormsAuthentication.RedirectFromLoginPage(username, persistent cookie?)
if(!IsPostBack) { if(!Session["Session_name"]=null) { //Your code while your session is not null } else { Response.Redirect("Login_Page.aspx"); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)