public ActionResult Form(HarnessModel model) { if (!ModelState.IsValid) { return(View()); } var json = JsonConvert.SerializeObject(model); return(Content(json)); }
public ActionResult Form() { var model = new HarnessModel { Text1 = "initial value", DateTime1 = new DateTime(2003, 02, 01), Int1 = 5, Radio1 = RValues1.Value2, CheckBox2 = true, }; return(View(model)); }
public ActionResult TextArea(HarnessModel model) { return(View()); }
public ActionResult ShowHideRadio(HarnessModel model) { return(View(Request.HttpMethod == "GET" ? new HarnessModel { Radio5 = true, Radio6 = false } : model)); }
public ActionResult ShowHideCheckbox(HarnessModel model) { return(View(Request.HttpMethod == "GET" ? new HarnessModel { CheckBox2 = true } : model)); }