public ActionResult SavePartial(Customer model) { // Just for this demo, add some validations here if (String.IsNullOrEmpty(model.DisplayName)) ModelState.AddModelError("DisplayName", "Name is required"); return PartialView("_EditCustomer", model); }
public ActionResult Index() { var model = new Customer(); return View(model); }