469,572 Members | 1,279 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,572 developers. It's quick & easy.

Store collection in Application Object

Is it possible to store collections of my custom defined object in an
application state variable.
How can this be done?
Nov 18 '05 #1
2 1291
While it is possible, it is not recommended. The way to do it is

C#:
Application["variable name"] = obj;
//or//
Application.Add("variable name", obj);

VB:
Application("variable name") = obj
'or'
Application.Add("variable name", obj)

But, you should think about using Cache or persistence for storing your
collections.

HTH,
Bill P.
"Geert M" <mv*****@yahoo.com> wrote in message
news:ej*************@TK2MSFTNGP11.phx.gbl...
Is it possible to store collections of my custom defined object in an
application state variable.
How can this be done?

Nov 18 '05 #2
Could you give an example of what you mean with persistence?

"Bill Priess" <no*****@nospam.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
While it is possible, it is not recommended. The way to do it is

C#:
Application["variable name"] = obj;
//or//
Application.Add("variable name", obj);

VB:
Application("variable name") = obj
'or'
Application.Add("variable name", obj)

But, you should think about using Cache or persistence for storing your
collections.

HTH,
Bill P.
"Geert M" <mv*****@yahoo.com> wrote in message
news:ej*************@TK2MSFTNGP11.phx.gbl...
Is it possible to store collections of my custom defined object in an
application state variable.
How can this be done?


Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Tony Johansson | last post: by
8 posts views Thread by Martin Maat | last post: by
3 posts views Thread by ExclusiveResorts | last post: by
11 posts views Thread by john_c | last post: by
158 posts views Thread by pushpakulkar | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.