Solved

How to detect inactivity and expire page automatically?

Posted on 2008-10-21
6
674 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Duplicate a row 2 46
Response.Redirect Open new Form/tab/page? 5 30
Display mvc partial view with errors on parent page 1 26
Resolve Dependency Issues 4 42
This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

919 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now