ASP.net会话销毁,如果他关闭浏览器 [英] ASP.net Session Destroy if he closes the browser

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

问题描述

我有一个网站。当用户登录会话详细信息将加载。
当用户注销会话详细信息将被遗弃。 (注销单击注销菜单)
当用户直接关闭浏览器,然后如何消灭了会议。

I have an website. When the user is logged the session details will loaded. When the user logged out the session details will abandoned. (Log out by clicking the logout menu) when the user simply closes the browser then how to destroy the session.

在接下来的时间其get记录使用相同的会话数据。我要避免这种情况。

In the next time its get logging with the same session data. I need to avoid this.

推荐答案

由于您注销处理部分,需要调用Session.clear()来清除键/值对:

As part of your handling of the logout, call Session.Clear() to clear the key/value pairs:

http://msdn.microsoft.com/en-us/library/system.web.sessionstate.httpsessionstate.clear.aspx

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

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