MultiStep form Strategies

F

fragmonster

Hi, I'd like to know what is the best strategy to develop a multi-step
form.

I have a 5 steps form which inserts in database only at the end. I
tried differents strategies (server.transfer, multi ascx dealing with
their visibility property ...etc)

For you, what is the best way to deal with a multi-step form in
ASP.NET? What are the importants things to do / to avoid ...etc ?

Thanks
 
J

Josh

I wouldn't bother with user controls unless you intend to reuse them
elsewhere.

In this situation I would create a holding <Table> with a seperate <TR>
group for each section. Make the <TR>'s runat server and give them IDs,
then you can make the <TR>'s visible, invisible as required.

Doing it this way keeps all of the controls you need in one place , utilises
viewstate to persist the data from one section to another, and for
maintenance you only have one place to look for the entire dialog.

Hope that helps
 
C

Curt_C [MVP]

You can use the session state to store the record information until the end
then commit it
 
K

Ken Dopierala Jr.

Hi,

When I have to do multiple steps and only need to post the data at the end I
usually develop each step in a div and put them all on the same page. That
way the user never has to wait for each new step to appear after a server
postback. Once they finish one step, hide that div and show the next one.
The first couple times it is a bit complicated to code. But once you build
sort of a system they are pretty easy to put together and your users will
appreciate how quickly the system responds. Good luck! Ken.
 
S

Sayed Hashimi

Visual Studio 2005 has an interesting solution called a MultiView.
Have a look at that if you have the beta release of 2005. If you
don't, then looking at the docs will give you the idea. I like their
solution because, like you, I have tried the same approaches you've
used in my applications. If you have the time, it's definately worth
the time to write something like a MultiView if you are not using
2005. Why not get a decompiler and try to look at what they are doing
and try to re-write that in 2003.

sayed
 
F

fragmonster

Thank you all. I will document myself on "Multiview". I will retain
the <tr runat="server"> of Josh and the Session strategy of Curt_C.

To be more precise, I need to do a postBack between each step because
I have some validator to Validate() (required and custom validators)
that's why the <div> strategy of Ken Dopierala Jr. does not seem to be
the best way.
 

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

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top