当我们在asp.net中使用Session.Clear和Session.Abandon时? [英] When we use Session.Clear and Session.Abandon in asp.net?

查看:68
本文介绍了当我们在asp.net中使用Session.Clear和Session.Abandon时?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请给我你宝贵的答案

解决方案

当用户点击Signout或退出时,我们需要清除会话。默认情况下,会话在理想状态20分钟后到期。



更好地使用登录控件并处理LoginStatus状态控制的LoggedOut和LoggingOut事件。 / blockquote>

Session.Clear()清除所有会话变量值,而Session.Abandon()消除(杀死)会话。


请点击链接。 。



http://stackoverflow.com/questions/1470445/what-is-the-difference-between-session-abandon-and-session-clear [ ^ ]



http://forums.asp.net/t/1689196。 aspx / 1 [ ^ ]



http://journeythroughwebdevelopment.wordpress.com/2009/01/02/difference-between-sessionabandon-sessionclear/ [ ^ ]





你肯定会得到答案。

谢谢


Please give me your valuable answers

解决方案

When the user clicks on Signout or logout we need to clear session. By default session expires after 20 min of ideal state.

Better to use login controls for this and handle "LoggedOut" and "LoggingOut" events of LoginStatus status control.


Session.Clear() clears the all session variables value whereas Session.Abandon() vanishes(kills) the session.


Please follow the links..

http://stackoverflow.com/questions/1470445/what-is-the-difference-between-session-abandon-and-session-clear[^]

http://forums.asp.net/t/1689196.aspx/1[^]

http://journeythroughwebdevelopment.wordpress.com/2009/01/02/difference-between-sessionabandon-sessionclear/[^]


you will definitely get the answer.
Thanks


这篇关于当我们在asp.net中使用Session.Clear和Session.Abandon时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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