469,281 Members | 2,450 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,281 developers. It's quick & easy.

Programmatically Tell If A Session Has Timed Out

Hi Gang

Is there any way with ASP that I can tell if a user session has timed out?

The problem is that we have a database app where a user session may time
out. After this happens the user may try to save the data that is on there
screen (without knowing they've timed out). I think what happens then
(after the save) is that we get zero's in some of the fields in the database
because the session has timed out.

Can you help at all?
Andy
Jul 19 '05 #1
2 3720
Andy wrote on 04 jul 2003 in microsoft.public.inetserver.asp.general:
Is there any way with ASP that I can tell if a user session has timed
out?

The problem is that we have a database app where a user session may
time out. After this happens the user may try to save the data that
is on there screen (without knowing they've timed out). I think what
happens then (after the save) is that we get zero's in some of the
fields in the database because the session has timed out.


Sure.

Give the user a session variable on first contact:

Session("Nottimedout")="Sure"

And test for it in the submitting target asp file:

If Session("Nottimedout")<>"Sure" Then
Response.write "You have timed out for sure !"
End If

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #2
You could give the user a timer (js) on each page which will alert them if
their session is about to time out. Or, if you don't want the session to
time out, have a js timer which loads an image from the server every 15 min
or so (depending on your session timeout): that will keep the session alive
while the browser is on your page.

Is this a login-protected application?

Tim.
"Andy" <an**********@milltronics.com> wrote in message
news:10***************@pbht107x.smpi.siemens.ca...
Hi Gang

Is there any way with ASP that I can tell if a user session has timed out?

The problem is that we have a database app where a user session may time
out. After this happens the user may try to save the data that is on there screen (without knowing they've timed out). I think what happens then
(after the save) is that we get zero's in some of the fields in the database because the session has timed out.

Can you help at all?
Andy

Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Harry Simpson | last post: by
9 posts views Thread by Patrick | last post: by
9 posts views Thread by viktor9990 | last post: by
4 posts views Thread by Chris Newby | last post: by
4 posts views Thread by Not Me | last post: by
7 posts views Thread by Microsoft Newsserver | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.