public ActionResult Login(UserLoginViewModel viewModel) { if (TryUpdateModel(viewModel)) { bool result = Membership.ValidateUser(viewModel.Username, viewModel.Password); if (result) FormsAuthentication.SetAuthCookie(viewModel.Username, false); return RedirectToAction("SelectCustomers","Mail"); } return View(viewModel); }
public ActionResult Login() { UserLoginViewModel viewModel = new UserLoginViewModel(); return View(viewModel); }