?
Solved

Session TimeOut Question

Posted on 2004-08-23
5
Medium Priority
?
1,848 Views
Last Modified: 2008-01-09
I have an application which by default times out at 20 minutes. I want it to stay at 20 minutes, however after 20 minutes I want for the page automaticaly refresh, and give an expired page warning "Page expired, please click refresh..." Thanks.
0
Comment
Question by:gtvingo14
3 Comments
 
LVL 18

Accepted Solution

by:
DotNetLover_Baan earned 336 total points
ID: 11875518
0
 
LVL 21

Assisted Solution

by:tovvenki
tovvenki earned 332 total points
ID: 11878917
Hi,
check whether the following discussion helps you
http://p2p.wrox.com/topic.asp?TOPIC_ID=4882

regards,
venki
0
 
LVL 20

Assisted Solution

by:ihenry
ihenry earned 332 total points
ID: 11879664

if you want to prompt user for a message use client-side script to handle that. The sample below will prompt user for a message 5 seconds after the page is loaded.

=-=-=- aspx =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
<html>
      <head>
            <title></title>
            <script language="javascript">
            <!--
            function SessionTimeOut()
            {
                  alert('Page expired, please click refresh...');
                  // or redirect to a page
                  // window.location.href='default.aspx';
            }
            // -->
            </script>
      </head>
      <body runat="server" id="body">
            <form id="Form1" method="post" runat="server">
            </form>
      </body>
</html>
=-=-=- aspx.vb - Page_Load event =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
      Dim sessionTimeout As Integer = 5000 // 5 seconds
      body.Attributes.Add( "onLoad", String.Format("window.setTimeout('SessionTimeOut()',{0});", sessionTimeout) )
End Sub


HTH
Henry
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses
Course of the Month15 days, 1 hour left to enroll

839 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