// // GET: /BindingTest/Edit/5 public ActionResult Edit(int id) { var model = new TestWeb.Domain.SomeModel(); model.Id = 8; model.Name = "Jonh"; model.Role = "Anon"; return View(model); }
// // GET: /BindingTest/Edit/5 public ActionResult Edit(int id) { var model = new TestWeb.Domain.SomeModel(); model.Id = 8; model.Name = "Jonh"; model.Role = "Anon"; return(View(model)); }
public ActionResult Edit(int id, TestWeb.Domain.SomeModel someModel) { try { var model = new TestWeb.Domain.SomeModel(); model.Id = 8; model.Name = "Jonh"; model.Role = "Anon"; this.UpdateModel(model); return View(model); } catch { return View(); } }
public ActionResult Edit(int id, TestWeb.Domain.SomeModel someModel) { try { var model = new TestWeb.Domain.SomeModel(); model.Id = 8; model.Name = "Jonh"; model.Role = "Anon"; this.UpdateModel(model); return(View(model)); } catch { return(View()); } }