public ActionResult Create() { var model = new CreateEventViewModel { // prepare the model for the first step Create = new CreateEventViewModel.EventCreate() }; return PartialView(model); }
public ActionResult Create(CreateEventViewModel model) { if (!ModelState.IsValid) return PartialView(model); if (model.Create != null) { model.Create = null; // prepare the model for the next step model.Invite = new CreateEventViewModel.EventInvite(); } else if (model.Invite != null) { model.Invite = null; } return PartialView(model); }