Question on Sessions variables

J

jty202

1. Can I have an array of objects as sessions variable in other words
sessions array-of-objects? If so how?

2. Besides Sessions variable what else can I use to store large amount of
data temporarily thats related to the current user.
( can I use temp files? and instead of storing the large text data in a
sessions variable or arrays, I could store the temp-file names which
contains the large text data? )
 
M

Matt Berther

Hello jty202,

How long do you need to store it? If its per request, you could look at the
HttpContext.Current.Items collection.
 
S

Stuart A Hill

Hi,

A session variable can pretty much take whatever you throw at it. I'd maybe
consider creating an array of objects and putting it in a session variable,
rather than the other way around. I have never tried that before, as I try
to avoid session variables if possible.

On your second point, for years developers have been looking for an
alternative to session variables. This article discusses a method using a
guid and a database. http://www.4guysfromrolla.com/webtech/041600-2.shtml

Good luck,

Regards,

Stuart
MCSD, MCT
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,139
Latest member
JamaalCald
Top