#1
  1. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Oct 2012
    Posts
    5
    Rep Power
    0

    After Abandon a session in classic ASP, why it still alive?


    Hi,

    This looks very simple, but can you help me? After Abandon a session in classic ASP, why it still alive:
    <%
    Session("abc")="sss"
    response.write "Session(""abc"") = " & Session("abc") & "<br>"
    Session.Abandon
    response.write "After Session.Abandon, Session(""abc"") = " & Session("abc") & "<br>"
    %>
    The output is:
    Session("abc") = sss
    After Session.Abandon, Session("abc") = sss
  2. #2
  3. No Profile Picture
    Contributing User
    ASP Adventurer (500 - 999 posts)

    Join Date
    Feb 2008
    Posts
    790
    Rep Power
    30
    You will be able to access the session variable from that page, but subsequent pages you will not.
  4. #3
  5. No Profile Picture
    Help and be helped
    ASP Adventurer (500 - 999 posts)

    Join Date
    Feb 2004
    Location
    Australia
    Posts
    584
    Rep Power
    123
    Try using
    Session.Contents.RemoveAll()

    Or explicitly declare all session that need to be removed.

    Session.Contents.Remove "namedSession"
    Life is Good
  6. #4
  7. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Oct 2012
    Posts
    5
    Rep Power
    0
    Thanks a lot for above two helps, both are correct answer!!

Similar Threads

  1. Session.Abandon
    By Bron in forum ASP Development
    Replies: 8
    Last Post: November 15th, 2007, 09:56 AM
  2. Session.abandon()
    By martialdc in forum ASP Development
    Replies: 1
    Last Post: March 15th, 2007, 06:04 AM
  3. Session.Abandon
    By viks_vbNETdevel in forum .NET Development
    Replies: 3
    Last Post: June 6th, 2004, 06:35 PM
  4. Session.Abandon vs Session.Contents
    By four_mrperfect in forum ASP Development
    Replies: 3
    Last Post: March 19th, 2004, 02:25 PM
  5. Replies: 10
    Last Post: February 24th, 2004, 07:30 AM

IMN logo majestic logo threadwatch logo seochat tools logo