Home > ASP Development > Stupid Session Variable question

Stupid Session Variable question



I know creating a session variable takes up memory and you should always release the session

if it is not being used. Using session.Abandon method will clear out all session variables but

is there a way to clear out a particular session variable?



Is this how you do it?

Session("FirstName") = ""

and would it release the memeory

    
Guest
Best Answer
Session("FirstName") =null;
Was this answer helpful ? Yes No   
arry.net@gmail.com


You can usually use Session.Content.Remove. Look in the asp documentation for the exact syntax that lets you remove a single node.



In the big picture, you are probably causing more of a load on the server to remove session data than if you just left it alone. The exception would be if you have very large session variables, like multiple kb in size.

Was this answer helpful ? Yes No   
Guest


thanks for that reply! You gave a really valid point!

Was this answer helpful ? Yes No   
Guest
 
 
Home - About Infoqu - Contact - Privacy Statement - Link to Infoqu - Bookmark Infoqu

Copyright 2007-2008 by Infoqu. All rights reserved