当我点击浏览器关闭按钮时,我想放弃会话

问题描述:

我在主页的body标签中尝试过onunload和onbeforeunload但是当我点击usercontrol上的链接作为菜单时它不起作用,如果刷新浏览器也无法正常工作。



我怎么知道浏览器在服务器端关闭了?

i have tried onunload and onbeforeunload in body tag of my master page but its not working when i have clicked the link on usercontrol as menu and also not working if refresh the browser.

how can i aware that the browser is gettig close on serverside???

请查看链接



如何在浏览器结束用户会话关闭 [ ^ ]



希望它能为您提供帮助。
please check the link

How to end user session when browser closed[^]

Hope it will help you.