public ActionResult Login() { AccountLoginVM model = new AccountLoginVM(); TryUpdateModel(model); AuthenticationService.AuthenticateConsultant(model.Username, model.Password); if (AuthenticationService.LoggedConsultant != null) { if (!String.IsNullOrEmpty(model.RedirectUrl)) { return Redirect(model.RedirectUrl); } return RedirectToAction("Index", "Home"); } return View(model); }
public ActionResult Login(string redirectUrl) { AccountLoginVM model = new AccountLoginVM(); model.RedirectUrl = redirectUrl; return View(model); }