public ActionResult Login(Account account) { if (account.Name == "Vahid" && account.Password == "123") ViewBag.Message = "Succeeded"; else ViewBag.Message = "Failed"; return View("Result"); }
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"); }
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"); }