Monday, January 5, 2009

if session is expire then redirec user like yahoo email

This code is redirect user on page where we show that is current session expired
and relogin login so on defautl button NavigateUrl="~/Admin/Login.aspx" Text="Click here to Login again" becz it is on preRender event so first it will execte

protected void Page_PreRender(object sender, EventArgs e)
HttpContext.Current.Response.AppendHeader("Refresh", Convert.ToString(((HttpContext.Current.Session.Timeout * 60) - 5)) + "; Url=Default.aspx");


HelpOnDesk Team

No comments: