Is it possible to create groups in session?
-
Hi, I was wondering is there a way to create groups in session. so that if I needed to clear down session variables pertaining to a particualr section of our application, I could call Sesswion.Clear on that group, but leave all others intact? Regards Paul Custance
-
Hi, I was wondering is there a way to create groups in session. so that if I needed to clear down session variables pertaining to a particualr section of our application, I could call Sesswion.Clear on that group, but leave all others intact? Regards Paul Custance
oceanexplorer wrote:
is there a way to create groups in session
Upto my knowledge NO.
oceanexplorer wrote:
so that if I needed to clear down session variables pertaining to a particualr section of our application, I could call Sesswion.Clear on that group,
You can do this using Arraylist or any other memory storage. So each of your section values are filled into ArrayList and store arraylist object to session. To remove a particular section data, simply do Session.Remove(your section name). So arraylist object contained in the specified location will be removed and others will still exist in the session.
-
oceanexplorer wrote:
is there a way to create groups in session
Upto my knowledge NO.
oceanexplorer wrote:
so that if I needed to clear down session variables pertaining to a particualr section of our application, I could call Sesswion.Clear on that group,
You can do this using Arraylist or any other memory storage. So each of your section values are filled into ArrayList and store arraylist object to session. To remove a particular section data, simply do Session.Remove(your section name). So arraylist object contained in the specified location will be removed and others will still exist in the session.
Thanks for your help, much appreciated. I have decided to implement a Dictionary in order to create groups in session. Regards Paul