Asp.Net and Session - some Interesting Facts

Discussion in 'ASP .Net' started by vikram.lakhotia@gmail.com, Sep 30, 2007.

  1. Guest

    Hi,
    Yesterday I was discussion with my colleagues about session and a few
    interesting things popped up. So I thought I would share the same with
    all.

    <a href=http://www.vikramlakhotia.com/
    A_few_interesting_things_about_session_in_AspNet.aspx>
    http://www.vikramlakhotia.com/A_few_interesting_things_about_session_in_AspNet.aspx</a>

    Vikram
    <A href=http://www.vikramlakhotia.com> http://www.vikramlakhotia.com</a>
    <A href=http://JustLikeThat.vikramlakhotia.com>http://
    JustLikeThat.vikramlakhotia.com</a>
    <A href=http://WhyNot.vikramlakhotia.com>http://
    WhyNot.vikramlakhotia.com</a>
     
    , Sep 30, 2007
    #1
    1. Advertising

  2. wrote:
    > Hi,
    > Yesterday I was discussion with my colleagues about session and a few
    > interesting things popped up. So I thought I would share the same with
    > all.
    >
    > <a href=http://www.vikramlakhotia.com/
    > A_few_interesting_things_about_session_in_AspNet.aspx>
    > http://www.vikramlakhotia.com/A_few_interesting_things_about_session_in_AspNet.aspx</a>



    > Session Class has two methods. Session.Abondon() and Session.Clear().
    > Both the methods are used to clear the data in the session. Both the
    > methods clear the data in the session.


    No, they don't. Session.Clear removes the session variables, but
    Session.Abandon doesn't remove anything at all from the session, it only
    flags the session object to be abandoned after the request has been handled.

    > But there is one difference between them. Session.Abondon() will
    > Session_end event will be fired and session_start event will be fired
    > on the next request.


    Yes, of course. Abandoning the session will end it, and the next request
    will start a new session. Clearing the session variables doesn't end the
    session.

    --
    Göran Andersson
    _____
    http://www.guffa.com
     
    =?ISO-8859-1?Q?G=F6ran_Andersson?=, Sep 30, 2007
    #2
    1. Advertising

  3. Mark Rae [MVP], Oct 1, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Casey Hawthorne
    Replies:
    0
    Views:
    425
    Casey Hawthorne
    Nov 23, 2004
  2. Replies:
    4
    Views:
    1,988
    Mark Space
    Jul 28, 2006
  3. Confusing facts...

    , Apr 15, 2007, in forum: Java
    Replies:
    8
    Views:
    583
    chandan
    Apr 17, 2007
  4. HarSwoffArrop
    Replies:
    0
    Views:
    2,300
    HarSwoffArrop
    Aug 29, 2012
  5. Thrinaxodon

    FACTS: WHY THE PYTHON LANGUAGE FAILS.

    Thrinaxodon, Jun 27, 2013, in forum: Python
    Replies:
    11
    Views:
    192
    Wayne Werner
    Jun 28, 2013
Loading...

Share This Page