Session handling in ASP.Net 2.0

Discussion in 'Software' started by rammca, Oct 25, 2006.

  1. rammca

    rammca

    Joined:
    Oct 25, 2006
    Messages:
    1
    Hi All,

    I am a new member. I am working in an ASP.Net 2.0 project. I need to keep track of user sessions in the database. ie. I have a table called users which consists of the following fields : Username, Password, IsLoggedIn, LastLoggedIn, LastLoggedOut.

    When a user logs in , I'll update the IsLoggedIn field to 1 and LastLoggedIn fields and similarlly when the user logs out , I'll update the IsLoggedIn field to 0 and LastLoggedOut fields. The thing is it works fine. But if the user closes the browser or visits some other web site , instead of logging out , I couldn't update the table. I tried by writing code in Session_On_End event but it fires only when the person logs out or the session expires.

    How to do this?. Please throw some light on the same.

    Thanks in advance. Waiting for u'r responses.

    Regards,
    S.Ramalingam
     
    rammca, Oct 25, 2006
    #1
    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. rizwan_087

    Handling frames in asp.net

    rizwan_087, Jul 18, 2006, in forum: Software
    Replies:
    2
    Views:
    1,172
    rizwan_087
    Apr 23, 2007
  2. bqmassey

    Storing class with session (ASP.Net)

    bqmassey, Sep 22, 2006, in forum: Software
    Replies:
    0
    Views:
    1,165
    bqmassey
    Sep 22, 2006
  3. kalim
    Replies:
    0
    Views:
    1,099
    kalim
    Jul 12, 2007
  4. imman

    session from asp to asp.net

    imman, Feb 20, 2008, in forum: General Computer Support
    Replies:
    0
    Views:
    943
    imman
    Feb 20, 2008
  5. Horsy
    Replies:
    2
    Views:
    844
Loading...

Share This Page