Click to See Complete Forum and Search --> : Need to keep form state and load form state from file


thomzon
09-07-2005, 09:31 AM
Hi everybody, It's Doctor Nick :D

I have a form with regular html selectboxes (controlled by javascript to push items around the selectboxes).
I need to find a way to keep the state of these items even after an asp.net button click event (which loads some session variables with the values of the form and makes a page.registerstartupscript for opening search results in a new window).
I was thinking that the same principles used when keeping the state might also be useful for loading the state from a specially formatted file.
example:

!!CARS
BMW
Buick
Honda
!!DRIVERS
Mitch
Bob
Hans
!!DATES
10.04.2005
15.04.2005

A1ien51
09-07-2005, 11:33 AM
Need to use a hidden field to do it.

Eric

thomzon
09-08-2005, 08:43 AM
Ok - I now enter the values into hidden fields throgh javascript.
However I am having problems figuring out the procedure for posting and receiving the values.

At the moment I try the following:
- on submit of form the hiddenfields are loaded into session variables
- then in the pages page_load section I load them if postback (also tried with if !postback).
However I dont get the values before I manually do a reload!

The values are entered by asp.net through select1.items.add

thomzon
09-12-2005, 03:52 AM
Has no-one an idea about the reason for the problem?
Really need the help