浏览器关闭asp.net时杀死会话 [英] kill session when browser is closed asp.net

查看:80
本文介绍了浏览器关闭asp.net时杀死会话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,



当浏览器或标签关闭时如何杀死会话.plz提示代码,我在谷歌搜索2天但是,我没有得到任何成功,PLZ帮助我

hello,

How to kill session when browser or tab is closed.plz provode the code, I search in 2 days in google but ,I am not get any sucess, plz help me

推荐答案

当浏览器关闭时,您无法清除会话。你可以处理窗口卸载事件并触发一个AJAX调用,但你不能确定它会触发。

相关主题:

如何在用户关闭浏览器后立即终止会话? [ ^ ]

在浏览器或选项卡关闭时关闭/终止会话 [ ^ ]



这是一篇文章:

当浏览器为clo时,服务器中的会话终止(注销)在ASP.NET中使用交叉按钮/ ALTF4进行定位 [ ^ ]







--Amit
You can not clear the session when the browser closes. You can handle the window unload event and fire an AJAX call, but you can''t be sure it will fire.
Related Threads:
How to kill the session as soon as user closes the browser?[^]
Close/kill the session when the browser or tab is closed[^]

Here is an article:
Session killing (logout) in server when browser is closed using cross button/ALTF4 in ASP.NET[^]



--Amit


这篇关于浏览器关闭asp.net时杀死会话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆