请任何人帮我解决c#中的注销码 [英] Please any one help me regarding Logout code in c#

查看:71
本文介绍了请任何人帮我解决c#中的注销码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用会话从客户表登录,我想知道如何编写注销代码..

I am using session for login from customer table and I want to know how to write a code for logout..

推荐答案

会话.Abandon():销毁会话并触发 Session_OnEnd 事件。



Session.Clear():只删除Object中的所有值(内容)。使用相同密钥的会话仍然有效。



来源: http:// stackoverflow.com/a/347382 [ ^ ]



参考原始来源添加和不必要的代码块格式删除[/编辑]
Session.Abandon(): destroys the session and the Session_OnEnd event is triggered.

Session.Clear(): just removes all values (content) from the Object. The session with the same key is still alive.

Source: http://stackoverflow.com/a/347382[^]

Reference to original source added and unnecessary code block formatting removed[/Edit]


我们无法准确告诉你如何要做到这一点,因为我们不知道您使用什么机制进行登录 - 更不用说您正在使用的环境。如果它是基于Web的,那么登录/注销最好通过使用成员资格来处理:MSDN:会员简介 [ ^ ],如果您正在使用它,您应该已经知道如何记录out,或者在文件中解释。



如果你在Winforms,那么你可能已经酿造了自己的登录系统,所以我们完全不知道你需要什么帮助。
We can't tell you exactly how to do it, because we have no idea what mechanism you are using for login - much less what environment you are working in. If it is Web based, then login / logout is best handled by using Membership: MSDN: Introduction to Membership[^], and if you are using that you should already known how to log out, or it is explained in the documents.

If you are in Winforms, then you have presumably "brewed your own" login system, so we have no idea at all what help you need.


这篇关于请任何人帮我解决c#中的注销码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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