public ActionResult Index(LoginReq req) { SValue.UID = req.loginid; var m = new SampleModel(); var ret = m.CheckLogin(req.loginid, req.password); if (ret != null) { FormsAuthentication.SetAuthCookie(req.loginid, false); return(RedirectToAction("Index", "Menu")); } else { ViewBag.Msg = "認証に失敗しました"; } return(View()); }