Solved

Session TimeOut Question

Posted on 2004-08-23
5
1,812 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
5 Comments
 
LVL 18

Accepted Solution

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

Assisted Solution

by:tovvenki
tovvenki earned 83 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 83 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

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…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

785 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