Introduction: Session plays important role in state
management in asp.net. In this article I have explained how to remove
particular session and all sessions.
C#.Net Code to remove sessions in asp.net
To remove particular session created
Session.Remove("SessionName");
or
Session["SessionName"] = null;
To remove all sessions created
Session.RemoveAll();
or
Session.Abandon();
VB.Net Code to remove sessions in asp.net
To remove particular session created
Session.Remove("SessionName")
or
Session("SessionName") = Nothing
To remove all sessions created
Session.RemoveAll()
or
Session.Abandon()
0 comments:
Post a Comment