public ActionResult Index(LoginInput input) { if (!ModelState.IsValid) { return View(input); } if (authenticationService.SignIn(input.Username, input.Password)) { formsAuthenticationGateway.RedirectFromLoginPage(input.Username, false); } ModelState.AddModelError("Login","Invalid Login"); return View(input); }
public ActionResult Index(string username) { var model = new LoginInput(); return View(model); }