Click to See Complete Forum and Search --> : session object


Chikara
04-11-2007, 02:11 PM
Is it possible to store an object as a session object.

example


set n = new comment
n.id = 2

set session("blah") = n
set n = new comment

set n = session("blah")

Response.write(n.id)


I'm looking for the output to be 2. I know this probably isn't the best way to handle this. I'm wondering how to get an object in and out of a session object, if possible.

Thanks!

Chikara
04-11-2007, 02:38 PM
This might explain my problem in more detail.

I have an ASP class that has a dynamic array in it. I'm trying to write a function that will return that dynamic array. I then want to save that array in a session object. I hope that helps explain things a little more.

Terrorke
04-13-2007, 08:54 AM
you can put all the values of your array in a string.
And store that string in a session.

Chikara
04-13-2007, 04:02 PM
I was afraid someone was going to say that :) .

I'll give it a shot then.

Thanks for the comment.