public ActionResult Index() { AccountInfo output = new AccountInfo(); return View(output); }
// return jsonStr if authenticate has passed public JsonResult JsonRes(AccountInfo input) { if (input.Account == "acc123" && input.Password == "acc123") { input.Name = "Smart Guy"; input.Age = 18; input.LoginAt = DateTime.Now; return Json(input, JsonRequestBehavior.AllowGet); } else return Json(new { message = "login failed!" }); }
public ActionResult Index() { AccountInfo output = new AccountInfo(); return(View(output)); }