473,386 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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

Hi,

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

Hope This helps.
Dee
"John Blair" <jo********@hotmail.com> wrote in message
news:Bl************@newsfe3-gui.ntli.net...
Hi,

I would like my page_load event to detect if a session has timed out..is
this possible? Thanks.

Nov 19 '05 #2
Thanks a lot - that did work - but i also found
Session.IsNewSession which works too. Thanks.

"dee" <de*@home.net> wrote in message
news:e$**************@TK2MSFTNGP10.phx.gbl...
If Session("myvar") Is Nothing Then
Response.Redirect("timeout.htm") ' for ex
End If

Hope This helps.
Dee
"John Blair" <jo********@hotmail.com> wrote in message
news:Bl************@newsfe3-gui.ntli.net...
Hi,

I would like my page_load event to detect if a session has timed out..is
this possible? Thanks.


Nov 19 '05 #3
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...
======================

"dee" <de*@home.net> wrote in message news:e$**************@TK2MSFTNGP10.phx.gbl...
If Session("myvar") Is Nothing Then
Response.Redirect("timeout.htm") ' for ex
End If

Hope This helps.
Dee
"John Blair" <jo********@hotmail.com> wrote in message
news:Bl************@newsfe3-gui.ntli.net...
Hi,

I would like my page_load event to detect if a session has timed out..is this possible?
Thanks.

Nov 19 '05 #4
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...
======================

"John Blair" <jo********@hotmail.com> wrote in message
news:uh***********@newsfe1-win.ntli.net...
Thanks a lot - that did work - but i also found
Session.IsNewSession which works too. Thanks.

"dee" <de*@home.net> wrote in message news:e$**************@TK2MSFTNGP10.phx.gbl...
If Session("myvar") Is Nothing Then
Response.Redirect("timeout.htm") ' for ex
End If

Hope This helps.
Dee
"John Blair" <jo********@hotmail.com> wrote in message
news:Bl************@newsfe3-gui.ntli.net...
Hi,

I would like my page_load event to detect if a session has timed out..is this
possible? Thanks.



Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: DavidS | last post by:
First: There are several ways to confuse one regarding session timeout. (1) web.config - <sessionState timeout="20"> (2) IIS Manager | Internet Information Services | ServerNode | Default Web Site...
11
by: Vishal | last post by:
Hello, can anybody tell me how I can extend the session expiry time? Is it done via code or via IIS? Sorry I am new and dont know about this.
2
by: Cam | last post by:
Hi to all I have searched this subject and found some posts but none of them seem to answer my problem. I am developing a shop site and need to detect when a session times out through...
4
by: Dst | last post by:
This is what i'm trying to do: I'm porting a windows app to a web app. I have a webform which will edit some data stored in a database. The data needs to be locked in the database, while editing....
4
by: UJ | last post by:
I have a page where the user can upload a video file. As you can guess, this may take a while. Is there a way I can change the session timeout for just this one page? I would also want to change...
25
by: =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?= | last post by:
I tried: <sessionState timeout="1"> </sessionState> bounced IIS, and after 1 minute still had a session. ??? -- thanks - dave
2
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post by:
I see a lot of posts claiming that you can use AJAX or Javascript to run some kind of "heartbeat" " server polling" that tells the server that the page is still open. I need to know how exactly to...
6
by: ChrisAtWokingham | last post by:
I have been struggling with unexpected error messages on an ASP.NET system, using SQL and C#. The application draws organisation charts, based on data stored in the SQL database. Some of the chart...
4
by: goscottie | last post by:
I used submodal as my popup window. With some tweaks, it working great in my app. However, I can't find a way to detect session timeout in the popup window. The app is a form based...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.