PDA

Click to See Complete Forum and Search --> : persistent variables?


ubunreal69
Sep 5th, 2004, 08:02 PM
I have an ASP page written in VB.NET which needs to work with a persistent collection over a couple of requests.

I have tried using each "control" in a collection, which didnt work, anyways ...

I created a New Collection object, populated it and gave it so a Session() cookie to keep untill the next request/postback, but it only keps the first object in the collection???? :confused:

Does anyone know what I mean or should I write up a basic example showing what I mean?

Any help is appreciated, Thanks :)

mendhak
Sep 6th, 2004, 12:13 AM
I think you should try explaining again. You mention persistence of variables, but you talk of controls...

ubunreal69
Sep 6th, 2004, 01:24 AM
Sure, I'll see if I can hack up a quick example tonight maybe (probably not enoguh time, I dont get home till late).

Maybe this will clarify in the mean time...

I am using a form full of controls, yes, but I am using a session cookie to keep information about these controls between postbacks, and because a single session cookie is keeping information for a fair couple controls it is holding a "collection"

So, a Session Variable is assigned a Collection containing information about the controls on the page.

mendhak
Sep 6th, 2004, 01:54 AM
The controls on your page, do they not persist their values between postbacks? That's the main idea behind ASP.NET.

venerable bede
Sep 6th, 2004, 03:16 AM
The Frogs right.
Have you got viewstate enabled for each .net control ?