How to detect if user has close the browser?

Discussion in 'ASP .Net' started by Lord2702, Oct 9, 2004.

  1. Lord2702

    Lord2702 Guest

    Fri. Oct. 08, 2004 11:10 PM PT

    In ASP.NET application, How to detect that user has close the browser, IE or
    Netscape, or may be any other ?

    Thanks,
     
    Lord2702, Oct 9, 2004
    #1
    1. Advertisements

  2. Use Javascript
     
    Patrick.O.Ige, Oct 9, 2004
    #2
    1. Advertisements

  3. Lord2702

    Lord2702 Guest

    Hello Patrick,
    I understand that it requires to use JavaScript, But Can you give some line
    of code, How to do it? Thanks.
     
    Lord2702, Oct 9, 2004
    #3
  4. Lord2702

    RJN Guest

    The brwoser provides "onbeforeunload" event and you can use this in the
    body tag to detect if the window is being closed
     
    RJN, Oct 10, 2004
    #4
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.