Hi all..
I have managed to build up a huge ViewState with data from multiple forms. Now rather than having to access each of them individually is there an easy way to loop through and find all the items of a view state and their values?
Cheers
-
-
Ok ignore that past question guys, i was so off track i was going the wrong way..
What im trying to do is..
I have a site with 4 application forms. The first 3 forms do screening to see if the person qualifies to complete the 4th page. This validation is all done on PostBack on each page. However, if the person makes it to page/form 4 i need to collect the data from the previous forms. I was thinking maybe the viewstate would pass this information for me? But im not guessing thats not going to work.
Any ideas? I cant used Sessions or Cookies..
Cheers -
hidden inputs?
-
What about the new Wizard control in ASP.NET 2.0?
Seems like the perfect match for that job... -
how about 4 sections contained within divs that you show hide as applicable, it keeps all the data within one form but gives the impression it's four separate pages.
Will work as long as the pages do not contain to many objects, otherwise it would become a maintenance nightmare... -
Just use panels for each section on one page and hide them when you go to another one.
Public Sub ShowPanel2(Sender As Object, E As EventArgs) Panel1.Visible = False Panel2.Visible = True Panel3.Visible = False Panel4.Visible = False End Sub
public void ShowPanel2(Object sender, EventArgs e) { Panel1.Visible = false; Panel2.Visible = true; Panel3.Visible = false; Panel4.Visible = false; }
-
I do what sbc does. You can make some pretty powerful forms and it's all in one place. I personally prefer building everything in one control now, even large forms. CreateChildControls, OnPreRender....fun stuff

-
Seriously, try the Wizard control, it does just that, and more, but much easier and with a lot less code...
-
Hi Guys,
2.0 wasnt an option as our production servers are running 1.1 of the framework. Thanks for the pointer though.
Went for the panel option in the end, just became a nightmare having to disable all the validation controls and then enable them on each of the "pages" as it is displayed...
Thanks for all your advice...
Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.