如何在asp.net中删除特定会话? [英] How to remove specific session in asp.net?
本文介绍了如何在asp.net中删除特定会话?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我面临的一个问题。我已经创建了两个会议:
I am facing a problem. I have created two sessions:
-
会话[将把userid] = UserTbl.userid;
-
会话[的UserType] = UserTbl.type;
Session["userid"] = UserTbl.userid;
Session["userType"] = UserTbl.type;
我知道如何使用删除会话 Session.clear()
。我想删除会话的UserType。
I know how to remove sessions using Session.clear()
. I want to remove the session "userType".
我如何删除特定会话?
推荐答案
有没有像会话容器,这样你就可以将其设置为空
There is nothing like session container , so you can set it as null
而是你可以设置单独的会话元素空或
but rather you can set individual session element as null or ""
像会话[将把userid] = NULL;
这篇关于如何在asp.net中删除特定会话?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文