14 September 2013

How to create and remove sessions in C#.net

Create Session in C#.net

Session["session_name"] = "adi";

Remove particular session in c#.net:

        Session.Remove("Session_name");

        (or)

        Session["Session_name"] = null;

Remove all sessions in c#.net:

       Session.RemoveAll();

        (Or)

        Session.Abandon();

No comments:

Post a Comment