473,406 Members | 2,956 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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 1376
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: F. Da Costa | last post by:
Hi, Does anybody know why IE5+ does *not* honour array objects (like a table) across a session? Example: Frame A contains a var tableVar which is set via form Frame B (on init) using...
24
by: Yang | last post by:
I found a very strange behavior when I write a C# windows application. If I allocate a huge chunk of memory by an array, the memory will never be released by .NET. The problem can be demostrated...
3
by: Tony Johansson | last post by:
Hello! Assume you want to store field object that a chess board consist of. A chess board consist of 64 fields where each field is either white or black. Now to my question how should I...
8
by: Martin Maat | last post by:
I am puzzled. I have this object that uses a thread. The thread is encapsulated by the object, the object has Start and Stop methods to enable the client to start or stop the thread. I found...
11
by: hoopsho | last post by:
Hi Everyone, I am trying to write a program that does a few things very fast and with efficient use of memory... a) I need to parse a space-delimited file that is really large, upwards fo a...
2
by: Mel | last post by:
This may be a stupid question, but here goes... I have created a NameValueCollection in my website's application state. If, during a page request, I add a string key and string value to the...
3
by: ExclusiveResorts | last post by:
Can the CallContext be used reliably for storing request specific data? We are developing an application library that uses the CallContext to keep an IdentityMap (hashtable of business objects...
11
by: john_c | last post by:
I'd like to store information for roles in Session variables. RoleA has a specific set of values, RoleB has a specific set and so one. When I access values for RoleA, it looks like this: ...
158
by: pushpakulkar | last post by:
Hi all, Is garbage collection possible in C++. It doesn't come as part of language support. Is there any specific reason for the same due to the way the language is designed. Or it is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.