![]() |
Session.Add method - what if called multiple times with the same k
I wonder what is happening if you subsequently use the session.add method
with the same key, but different values. e.g. if I do; session.add("MyVar", "a") session.add("MyVar", "b") then; session("MyVar").tostring will return "b" Is the value you are adding ("b") simply replacing the olde value ("a") If so, should the name of the method then not be something like session.set, because you are not actually adding anything. Can't find anything about this in the documentation. Some explaination is appreciated. |
Re: Session.Add method - what if called multiple times with the same k
Hi, I believe it is because of MS wants to reduce the number of properties/methods etc., and It makes sense when assuming that Session is a memory area ( like a container) where you will add up all your values. "Set" sounds to be setting some thing with determined manner. Hope, this makes sense :) Cheers! "Martin" <unko@nowhere.net> wrote in message news:3F6EFC55-556C-497C-91DB-3A23C81C0178@microsoft.com... >I wonder what is happening if you subsequently use the session.add method > with the same key, but different values. > > e.g. if I do; > session.add("MyVar", "a") > session.add("MyVar", "b") > > then; session("MyVar").tostring will return "b" > > Is the value you are adding ("b") simply replacing the olde value ("a") > If so, should the name of the method then not be something like > session.set, > because you are not actually adding anything. > > Can't find anything about this in the documentation. Some explaination is > appreciated. |
We can add more session with same key value
Hi ,
I was also same doubt like this. i have implemented this scenario in my client application. it is working fine. So :thrasher::thrasher::thrasher: Regards Saravanakumar T, M.M.Patti Coimbatore. Quote:
|
| All times are GMT. The time now is 06:48 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.