Related Posts Plugin for WordPress, Blogger...

About

Follow Us

Monday, 2 February 2015

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()
Categories: , ,

0 comments:

Post a Comment