views:

330

answers:

1

We have a bunch of different applications that basically do the same thing written using the Wizard Control for .Net 2.0. At this point there are roughly 10 or so of those applications.

The steps are pretty simple:

User selects option from a drop downs -> Next page has more options more narrowed -> User sees confirmation page -> Report is generated

There are some of these applications that have optional pages such as allowing the user to upload custom images for the report and select specific lines of data.

I'm attempting to merge everything into one application but I'm not sure I'm approaching this the correct way. My first inclination is to create configuration tables in SQL to drive the menus that appear. So for example there would be a table with the WizardId, Name, Theme, etc and then also a table of steps and another table to link everything together for starters anyway.

Is there an easier way to approach this that I'm just missing?

A: 

We've been thinking through this issue lately and I've come up with two options that both seem valid, just have different uses. One way to do it is similar to what you have described where you have a table that holds the wizard information, another one that lists the types of questions to be asked in each wizard, and then a table to hold the data entered by the user for each question. This is very flexible, but the problem is you have to dynamically generate all the controls you need to collect the information (textbox, drop down, radio, file upload, etc) and store how to display that control in your database.

The other approach that we have tried out on a recent project is to associate a user control with either each wizard or type of wizard step. It isn't as modular, but you have a lot of control over how the controls are arranged and how you collect the data.

I think both approaches are useful in different scenarios. Going with a database driven approach allows you to generate new questions and wizards easily, but lacks the user friendly approach that we wanted for our new application.

Austin