为什么Session.Clear()在asp.net的PageLoad中使用? [英] Why Session.Clear () used in PageLoad in asp.net?
本文介绍了为什么Session.Clear()在asp.net的PageLoad中使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
为什么我们在asp.net login.aspx.cs页面中的PageLoad事件中使用Session.Clear()方法
Why we use Session.Clear() method in PageLoad Event in asp.net login.aspx.cs page
推荐答案
这取决于谁编写了代码。但是,它可能会确保如果有人进入登录页面,如果他们的会话处于活动状态,那么现在可以根据用户想要再次登录的情况清除它。
It depends on who wrote the code. But, it is likely to make sure that if someone is going to the login page that if they had a session active, it now gets cleared under the assumption the user wants to login again.
这篇关于为什么Session.Clear()在asp.net的PageLoad中使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文