public ActionResult CheckPin(PinModel model) { if (ModelState.IsValid) { IsPinChecked = true; return Redirect(LastActionUrl); } PinFailCount++; if (PinFailCount > 3) { return RedirectToAction("Index"); } model.FailCount = PinFailCount; return View(model); }
public ActionResult CheckPin() { var model = new PinModel {FailCount = PinFailCount}; return View(model); }