How to detect browser close at server side in asp.net?

前端 未结 4 1898
情深已故
情深已故 2021-01-18 02:25

I wanted to know when the browser is closed at server side in asp.net 2.0. How to detect in code behind?

4条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-18 02:36

    The quite obvious question is why do you need this? Do you want to store logout time or closing time? Then its better to catch in session timeout. Do you want to redirect some other page then its better to catch in page unload event of javascript.

提交回复
热议问题