Solved

Keeping a list in memory

Posted on 2013-06-17
3
156 Views
Last Modified: 2013-06-19
May sound like a dumb question but here goes.

I instantiate a LIST from my homepage, the list is in a global class file, and returns all the information about the person logging in. the person, could have one or more accounts associated with the site, and therefore i need to code against a default flag to display their default account informaiton. However, i then also need to build their other account information and display this for them.

The additional account(s) are listed in a drop down box. when the drop down box fires off, instead of calling out to the class again, and retrieving all the necessary information, as i've already done this once, how can i store the object, so that it can be used?

I've looked at Session Variables, but this gets a bit messy (I have 35 fields being returned in my list), plus, the Session variables only get set the first time around, not on DDL changed.

therefore, I need a way of having quick access to the object. - what's the best approach?
0
Comment
Question by:Wayne Atherton
3 Comments
 
LVL 13

Expert Comment

by:jonnidip
ID: 39253261
You may try to approach it by using System.Web.Caching.Cache class.

Regards
0
 
LVL 14

Accepted Solution

by:
Daniel Junges earned 500 total points
ID: 39253268
you can store you list on the Session or on the Application object,

Example:

Session["myList"] = myObject;
or
Application["myList"] = myObject;
0
 
LVL 1

Author Closing Comment

by:Wayne Atherton
ID: 39258859
thanks
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Flash (http://en.wikipedia.org/wiki/Adobe_Flash) has evolved over the years to where it has become a masterful tool for displaying content screen.  It has excellent layout placement, UI precision as well as rendering capabilities. This, along with t…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

805 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question