コード例 #1
0
 public ActionResult Index()
 {
     AccountInfo output = new AccountInfo();
     return View(output);
 }
コード例 #2
0
        // 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!" });
        }
コード例 #3
0
        public ActionResult Index()
        {
            AccountInfo output = new AccountInfo();

            return(View(output));
        }