DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3

Thread: Session Timeout

  1. #1
    Pam Guest

    Session Timeout


    Does anyone have a good example for coding a session timeout.
    I have a page, which I only want to remain open for about 10 min. and after
    the 10 min. expires it needs to be redirected to anther page.
    I am a novice to ASP development, and would appreciate any help.
    Thanks in advance,
    Pam

  2. #2
    Steve Guest

    Re: Session Timeout


    Within your Global.asa file

    Sub Session_Onstart
    Session.Timeout = 10
    End Sub

    Then, within your asp file, you will have to check this value before performing
    an operation to determine if the time has expired.

    "Pam" <pamelawright@hotmail.com> wrote:
    >
    >Does anyone have a good example for coding a session timeout.
    >I have a page, which I only want to remain open for about 10 min. and after
    >the 10 min. expires it needs to be redirected to anther page.
    >I am a novice to ASP development, and would appreciate any help.
    >Thanks in advance,
    >Pam



  3. #3
    Pam Guest

    Re: Session Timeout


    I tried this instead, and it didn't seem to work:

    <%
    if response.expires = 10 then
    response.redirect("newpage.asp")
    end if
    %>

    Pam



    "Steve" <sa1lopez@hotmail.com> wrote:
    >
    >Within your Global.asa file
    >
    >Sub Session_Onstart
    > Session.Timeout = 10
    >End Sub
    >
    >Then, within your asp file, you will have to check this value before performing
    >an operation to determine if the time has expired.
    >
    >"Pam" <pamelawright@hotmail.com> wrote:
    >>
    >>Does anyone have a good example for coding a session timeout.
    >>I have a page, which I only want to remain open for about 10 min. and after
    >>the 10 min. expires it needs to be redirected to anther page.
    >>I am a novice to ASP development, and would appreciate any help.
    >>Thanks in advance,
    >>Pam

    >



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links