public ActionResult Login(LoginModel model, string returnUrl) { if (ModelState.IsValid) { //WebSecurity.Login(model.UserName, model.Password, persistCookie: model.RememberMe)) string success = App_Code.CustomSecurityProvider.Login(model.UserName, model.Password, model.RememberMe); if (success == "ok") return RedirectToLocal(returnUrl); else ModelState.AddModelError("", success); } return View("Login", model); }
public ActionResult Login(string returnUrl) { var model = new LoginModel(); ViewBag.ReturnUrl = returnUrl; return View(model); }