ASP.NET Tips : Redirect the page when the session ends

protected void Page_Load(object sender, System.EventArgs e)
{
    if (!Page.IsPostBack) {
        Response.AppendHeader("Refresh", (Session.Timeout * 60) + 5 + "; Url=SessionEnded.aspx");
    }
}

No comments:

Post a Comment