示例#1
0
        public ActionResult Login(Account account)
        {
            if (account.Name == "Vahid" && account.Password == "123")
                ViewBag.Message = "Succeeded";
            else
                ViewBag.Message = "Failed";

            return View("Result");
        }
示例#2
0
        public ActionResult LoginResultUpdateFormCollection(FormCollection collection)
        {
            var account = new Account();
            this.UpdateModel(account, collection.ToValueProvider());

            if (account.Name == "Vahid" && account.Password == "123")
                ViewBag.Message = "Succeeded";
            else
                ViewBag.Message = "Failed";

            return View("Result");
        }
示例#3
0
        public ActionResult LoginResultUpdateModel()
        {
            var account = new Account();
            this.UpdateModel(account);

            if (account.Name == "Vahid" && account.Password == "123")
                ViewBag.Message = "Succeeded";
            else
                ViewBag.Message = "Failed";

            return View("Result");
        }