I have a project using ASP.Net MVC & EF5. The Model has a large enough number of fields that the app will need several pages to collect all of the data.
Once the da
You could create one ViewModel class that each page uses (strongly typed view) and just store the fields that aren't being edited in hidden fields. Your controller would have an action method and view for each step. When each step is submitted you return the View (along with the View Model) for the next step.
On the last page, you submit the View Model and save it.
Contoller code:
[HttpPost]
public ActionResult Step1(MyBigViewModel model)
{
//do work
return View("Step2", model);
}
[HttpPost]
public ActionResult Step2(MyBigViewModel model)
{
//do work
return View("Step3", model);
}
[HttpPost]
public ActionResult Step3(MyBigViewModel model)
{
//save here
return View("Success", model);
}
Another option is to use a "Wizard-like" UI on a single page. Here's one I've used before with success:
https://github.com/mstratman/jQuery-Smart-Wizard