locked
How to find browser closed event in asp.net for update values in Database and Closed session RRS feed

  • Question

  • User1997788493 posted

    How to find browser closed event in asp.net c#?

    1.I want to put one alert when browser closed and when he closed i want to closed session and update logout time and Isonline status values in database.?

    how to do this..?

    Tuesday, February 6, 2018 11:08 AM

Answers

  • User475983607 posted

    1.I want to put one alert when browser closed and when he closed

    Use the unload and beforeunload JavaScript events to show an alert.

    i want to closed session and update logout time and Isonline status values in database.?

    how to do this..?

    There is no reliable way to accomplish this requirement.  Modern browser ignore AJAX requests when the browser closes.   

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, February 6, 2018 11:53 AM