how to make a wizard with ASP.Net MVC
Our site has multiple "wizards" where various data is collected over several pages, and cannot be committed to the database until the last step.
What is the best/correct way to make a wizard like this with ASP.Net MVC
I don't believe there is a best/correct way, but the way I'd do it is...
Each wizard gets its own page. Each step gets its own div. All steps are in the same form.
The previous/next buttons would essentially hide/show the div in each step of the process. The last step's submit button submits the entire form. It would be pretty trivial to implement this using jQuery, and it would be easy to maintain as all the wizard steps are in a single ViewPage.
On the controller side, you'd have two controller methods, the HttpVerbs.Get version that would prepare the form for viewing and the HttpVerbs.Post version that would take a FormsResult and parse it to get out the information required to submit the user's answers to storage/other processes.
Wow, your boss stinks.
You can make your Next and Prev buttons using the ActionLink HtmlHelper method.
Make the different panels all be client side ... all in the same form ... and when the final submit button is pressed, you can post all of the values at the same time.
I put together a login wizard and documented the ideas behind it on my blog if that helps: link text
You can use the simple component MVCWizard.Wizard available on NuGet. The WizardController allows you to create a wizard using partial view. There is also the AutoWizardController that renders the entire wizard in a single view. All these components operate with the session to store the model state.
There is a very simple, flexible and extensible method in this question: How to simplify my statefull interlaced modal dialogs in ASP.NET MVC