How can i detect a session timeout in an asp.net page?

  • Thread starter Thread starter John Blair
  • Start date Start date
J

John Blair

Hi,

I would like my page_load event to detect if a session has timed out..is
this possible? Thanks.
 
If Session("myvar") Is Nothing Then
Response.Redirect("timeout.htm") ' for ex
End If

Hope This helps.
Dee
 
Thanks a lot - that did work - but i also found
Session.IsNewSession which works too. Thanks.
 
That doesn't detect if a session has timed out.
It detects whether a session is active.



Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================
 
Again, that doesn't detect whether a session has timed out.
It detects whether a session is a new session.

Those two concepts are vastly different.



Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top