Session Timeout Detection and Continue Session if Needed - Best Method ?

J

James

Hi,

I've searched many times for the best method to detect session time in an
ASP.NET 2.0/3.5 web application, however, the ones I've found did not have
option to continue session.

Could anyone point me to a code link that:
1. Detects session timeout.
2. Pop up a Yes/No dialog that allows user to continue session, then time
out completely if no response is made within a set time of minutes.

Thanks,
James
 
J

James

Mark,

Simply I want to avoid the exception errors that occur when session
variables become null after the timeout.

James
 
J

James

Mark Rae said:
[please don't top-post]
Simply I want to avoid the exception errors that occur when session
variables become null after the timeout.

if (Session["MyVariable"] != null)
{
// session variable exists, so use it
}
else
{
// session variable doesn't exist, so do something about it
}

Also, see:
http://www.google.co.uk/search?sourceid=chrome&ie=UTF-8&q=IsNewSession

Mark,

This is not what I am looking for. I can't go in and write code like that
all over the application within the context of first my post! This has to be
a global (application wide) solution.
Anyway, thanks for the links; that helped.

James
 

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

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top