Notices

Great community. Great ideas.

Welcome to ASP/Free, a community dedicated to helping beginners and professionals alike in improving their knowledge of Microsoft's development and administration technologies. Sign up today to gain access to the combined insight of tens of thousands of members.

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

Results 1 to 4 of 4
Share This Thread →
  1. #1
    makth is offline Registered User
    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
    phoenixaz is offline Contributing User
    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.

  3. #3
    webb is offline Help and be helped
    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

  4. #4
    makth is offline Registered User
    Join Date
    Oct 2012
    Posts
    5
    Rep Power
    0
    Thanks a lot for above two helps, both are correct answer!!

Share This Thread →

Become Part of This Conversation

Join NowFor Free!

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

ASP Free Advertisers and Affiliates