Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Session TimeOut Question

Posted on 2004-08-23
5
1,820 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
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…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

829 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