Link to home
Start Free TrialLog in
Avatar of Adrian Sluijters
Adrian SluijtersFlag for United Kingdom of Great Britain and Northern Ireland

asked on

ASP.NET Session Data/Array?

Hello,

How would I achieve this:

"SELECT Names from SomeTable" populates a 1-d array called CustomerNames

That array remains even though the user changes pages etc... Its pretty much a constant (as to put it) I need this list accessible from all over the app. I just want to minimize on SQL calls.

Is this possible? I dont want to have to run that SQL statement every time I need the list (elsewhere int eh app) I jsut want it to run once and be publically available
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Adrian Sluijters

ASKER

are sessionvariables datatype-less or do they assume the data-type of the content?
Session variables are type=object, and can accept anything, so you need to cast the return type into a specific variable type to access its properties.

Bob