Tamil Codes
Adding , removing and Clearing session values
By TamilCodes
Added on October 20, 2009
Viewed 661 Times

This just a small snippet to add, clear and remove all the session values in C#. 

To add and remove a session value

To add

Session["username"] = "JonDoe";

To Remove

Session["username"] = "";

To clear and remove all the session values

Session.Contents.RemoveAll();

Session.Abandon();

 


Comments
No Comments. Be the first to post comments
   
Name:
Comments:
     
   

© 2008 - 2010. Tamilcodes.com. All rights reserved.
Valid XHTML 1.0 Transitional Valid CSS!