Multi-page wizard in MVC - where to store the entered data

What do you think is the best way to create a multi-page wizard in asp.net-mvc? I think:

  • create a hidden field on each page that contain my entire serialized object
  • override OnActionExecuting -> get my object from hidden or tempdata li>
  • override OnResultExecuted -> put the object in tempdata when I go to the next page (when redirecting)
+5
source share
1 answer
  • Wrap each step of the wizard in some <form>element
  • Provide the form when proceeding to the next step (via javascript or via <input type='submit'>
  • - , .
  • Session , -post
  • Session
  • , .

[Serializable]
public class WizardAnswers

- .

+6

All Articles