Note that there are some explanatory texts on larger screens.

plurals
  1. POASP.NET MVC 2 RC 2 "Wizard" for whole model validation
    primarykey
    data
    text
    <p>There is a good simple solution for a multi-page "Wizard" control in MVC here:</p> <p><a href="http://www.highoncoding.com/Articles/647_Creating_Wizard_Using_ASP_NET_MVC_Part_1.aspx" rel="nofollow noreferrer">http://www.highoncoding.com/Articles/647_Creating_Wizard_Using_ASP_NET_MVC_Part_1.aspx</a></p> <p><a href="http://www.highoncoding.com/Articles/652_Creating_Wizard_in_ASP_NET_MVC_Part_2.aspx" rel="nofollow noreferrer">http://www.highoncoding.com/Articles/652_Creating_Wizard_in_ASP_NET_MVC_Part_2.aspx</a></p> <p>The model is populated in several steps and a hidden field is used to persist data between pages (somewhat similar to ViewState). However, with the release of MVC 2 RC2, the validation mechanism has been changed from "input validation" to "model validation": <a href="http://bradwilson.typepad.com/blog/2010/01/input-validation-vs-model-validation-in-aspnet-mvc.html" rel="nofollow noreferrer">http://bradwilson.typepad.com/blog/2010/01/input-validation-vs-model-validation-in-aspnet-mvc.html</a></p> <p>Now the first page in the "Wizard" never gets validated, since it only populates part of the model. (The rest is to be populated during further steps, but since there can be required fields, validation errors are shown during the validation for the first page and the user can't proceed).</p> <p>Is there a way to modify this implementation of the "Wizard control" to suit MVC RC2, or should the whole logic be re-thought? Are there any better patterns for creating a multi-page "wizard control" for populating a model?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload