Session Timeout


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

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

    >



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


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center