Solved

How to detect inactivity and expire page automatically?

Posted on 2008-10-21
6
675 Views
Last Modified: 2010-04-21
In one of my web-page I require that if user is not working on it and it remains neglected for certain interval, it should automatically return to the home page.
0
Comment
Question by:rpkhare
  • 3
  • 2
6 Comments
 
LVL 6

Expert Comment

by:M3mph15
ID: 22773583
When they log in add a variable to the session and check for it in the page_load. The session has a timer. So say its 30mins then the session will expire after 30mins of inactivity. So when it doesn't find the session either they havent logged in or the session is expired. So something like this:
Protected Sub Page_Load()
      Dim s as string = Session("[variable]")
      if s Is Nothing Then
               Response.Redirect("Home.aspx")
      End If
End Sub
0
 
LVL 8

Author Comment

by:rpkhare
ID: 22789153
Does the session has a timer by default?
0
 
LVL 6

Expert Comment

by:M3mph15
ID: 22792857
Yes. I don;t know exactly what the timer is but the session does have a default timer value that can be overridden.
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 8

Author Comment

by:rpkhare
ID: 22793680
I'll check and revert back.
0
 
LVL 7

Accepted Solution

by:
ASPSQLServerCOM earned 125 total points
ID: 22796459
HI, if you are looking at the client side only (means page already loaded in browser) and after certain time you can redirect the page to some default page

http://javascript.internet.com/page-details/session-time-out.html

0
 
LVL 8

Author Closing Comment

by:rpkhare
ID: 31508439
Thanks
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
IIS issues - Convert to Application - APS.NET v4.0 3 36
Output Caching in IIS 2 31
How to close an asp.net web form using C# ? 4 31
jquery datatables, asp.net MVC 9 42
In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question