Catching the closing browser event in the server side...

Discussion in 'ASP .Net' started by genc ymeri, Apr 12, 2006.

  1. genc ymeri

    genc ymeri Guest

    Is anyway I can catch the event of client closing the browser in server side
    (ASP.Net) ???

    Thanks in advance,
    Genc Ymeri.
     
    genc ymeri, Apr 12, 2006
    #1
    1. Advertising

  2. genc ymeri

    Darren Kopp Guest

    The only way I know of is to use an AJAX method attached to the
    window.unload event.

    HTH,
    Darren Kopp
    http://blog.secudocs.com/

    "genc ymeri" <> wrote in message
    news:%...
    > Is anyway I can catch the event of client closing the browser in server
    > side (ASP.Net) ???
    >
    > Thanks in advance,
    > Genc Ymeri.
    >
     
    Darren Kopp, Apr 12, 2006
    #2
    1. Advertising

  3. genc ymeri

    cmay Guest

    The only way I know of is to use an AJAX method attached to the
    window.unload event.


    I second this thought.
     
    cmay, Apr 12, 2006
    #3
  4. There is absolutely no way to guarantee that this will work. Its better to
    do work associated with a user leaving the webpage in the session_end event
    handler of global.asax.

    "cmay" wrote:

    > The only way I know of is to use an AJAX method attached to the
    > window.unload event.
    >
    >
    > I second this thought.
    >
    >
     
    =?Utf-8?B?V2lsbGlhbSBTdWxsaXZhbg==?=, Apr 13, 2006
    #4
  5. genc ymeri

    genc ymeri Guest

    > There is absolutely no way to guarantee that this will work...
    Tthat's what I was questioning too....




    "William Sullivan" <> wrote in
    message news:...
    > There is absolutely no way to guarantee that this will work. Its better
    > to
    > do work associated with a user leaving the webpage in the session_end
    > event
    > handler of global.asax.
    >
    > "cmay" wrote:
    >
    >> The only way I know of is to use an AJAX method attached to the
    >> window.unload event.
    >>
    >>
    >> I second this thought.
    >>
    >>
     
    genc ymeri, Apr 13, 2006
    #5
  6. genc ymeri

    cmay Guest

    Oh yea, there is definately no way to guarantee that you will catch
    this event.

    What if the browser crashs? What if the person has javascript turned
    off?

    What I meant is that doing the AJAX method is the only way you can even
    try to get this event. How often will it work? 70-80-90%? Who knows.


    But if it something that you NEED 100% on, then you are out of luck.
     
    cmay, Apr 13, 2006
    #6
    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. =?Utf-8?B?U2lsZWVzaA==?=

    Closing browser window from server side in asp.net

    =?Utf-8?B?U2lsZWVzaA==?=, Oct 13, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    60,339
    Braxxon
    Sep 21, 2008
  2. Replies:
    0
    Views:
    473
  3. Replies:
    1
    Views:
    6,348
  4. Santel
    Replies:
    7
    Views:
    535
    Laurent Bugnion [MVP]
    Jan 8, 2007
  5. Guest

    Fire server side event before client side event

    Guest, Mar 17, 2005, in forum: ASP .Net Web Controls
    Replies:
    3
    Views:
    622
    Ken Cox [Microsoft MVP]
    Mar 18, 2005
Loading...

Share This Page