I have an asp.net web application where the sessionstate mode is “InProc”. For Inproc, by default the session expiry is 20minutes. I would like to display a session expiry countdown popup for one minute before the session expires. But i cant find a property that says how many mimutes has goneby. How to know if it is the 19th minute.
Right now i am doing like below:
if (Context.Session != null)// Check whether the session is null
{
if (Session.IsNewSession)// If the session is null, check whether the session is new
{
Response.Redirect("../SessionTimeout.aspx");//Redirect to time out page
}
}
you can use some ajax to accomplish this.
here is a possible solution:
then you have to develop your countdown code in the WebMethod: