Caught the following idea while looking for something else and thought i'd share it here.
Bascally, when a session expires, it's good practice to redirect to a 'safe' page that let's the user know that both the seesion has expired AND that any personal info is not on display.
to this end, the following can be added to the template.master.cs file:
protected void Page_PreRender(object sender, EventArgs e)
{
HttpContext.Current.Response.AppendHeader("Refresh ",
Convert.ToString(((HttpContext.Current.Session.Tim eout * 60) - 5))
+ "; Url=default.aspx?timeout=true");
}
obviously, the value Url=default.aspx?timeout=true would be that of an informational page or (as i've done) a parameter added onto the default.aspx page that when opened diplays the 'information' panel.
just so you know :)
also, the more discerning among you will twig to the idea that the same kind of logic (appending a response header) could be applied to the AddEditPost.aspx form to redirect to the 'urlreferer' after 5 seconds or so once a post has been added/amended!!
jimi
http://www.originaltalent.com