public ActionResult ValidateUser(UserModel u) { if (UserAuthentication.CheckUser(u)) { string s; s = Session.SessionID; Session["user"] = u; UserModel.AddSessionId(s); List <UserTypeModel> l = UserTypeModel.GetUserType();; //var url = Url.RouteUrl("ActionApi", new { controller = "Home", action = "Get" }); //return RedirectToAction("Get", "Home", Url.RouteUrl("ActionApi", new { controller = "Home" })); return(RedirectToAction("Home", "Home")); } else { //ModelState.AddModelError("", "The user name or password provided is incorrect."); return(View("Login", u)); } }