public ActionResult Index(BasicDemoModel model) { if (ModelState.IsValid) { model.Message = "It's All Good"; } else { model.Message = "Something went wrong"; } return View(model); }
//[OutputCache(Duration = 10, VaryByParam = "none")] public ActionResult Form(BasicDemoModel model) { if (ModelState.IsValid) { model.Message = "It's All Good"; } else { model.Message = "Something went wrong"; } return PartialView("PartialForm",model); }
public ActionResult TransformedView() { var model = new BasicDemoModel{Name = "Demo User"}; return View(model); }
public ActionResult Index() { var model = new BasicDemoModel(); return new XmlResult(model); }
public ActionResult Index() { BasicDemoModel model = new BasicDemoModel(); //model.City = "Boise"; return View(model); }
public ActionResult Form() { var model = new BasicDemoModel(); return View(model); }