How to: do something on the server when user close the browser?

Discussion in 'ASP .Net' started by Feng, Dec 2, 2003.

  1. Feng

    Feng Guest

    Hi,

    What I need is to run some ASP code on the server, when
    user close his/her browser. I tried to create a "OnUnload"
    event handler on client side JavaScript to do a "Submit
    ()". But that doesn't seem to help.

    Can someone help me on this?

    Thanks
     
    Feng, Dec 2, 2003
    #1
    1. Advertising

  2. Feng

    AW Guest

    Hi Feng,

    You may want to use the Session_End event, which happen some time after the
    user closes his/her browser (after the timeout, which has a default of 20
    minutes).

    If not, you may use a javascript as you guessed, but you would instead have
    it to open another window that would call an url on you site to tell that
    the browser was closed.
    --
    To reply, remove a "l" before the @ sign.

    Arnaud Weil - MCT, MCSD.Net, MCAD.Net
     
    AW, Dec 2, 2003
    #2
    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. Jerry III
    Replies:
    2
    Views:
    611
    Kathy Burke
    Aug 3, 2003
  2. Denon
    Replies:
    1
    Views:
    587
    Saravana [MVP]
    Nov 14, 2003
  3. feng
    Replies:
    4
    Views:
    11,816
    Eric Lawrence [MSFT]
    Feb 29, 2004
  4. Iñaki Baz Castillo
    Replies:
    7
    Views:
    893
    Iñaki Baz Castillo
    Jan 12, 2010
  5. Replies:
    0
    Views:
    516
Loading...

Share This Page