title: MVC C# Redirecting to another controller
body: <p>I am having problems with redirecting from one controller to another, my ASP.NE MVC application starts on the login page, then moves to an otp page when the user successfully logged in (The LOGIN and OTP actions is in the same controller). </p>
  
  <p>When the OTP was successfully submitted, then the application must continue to the menu page, but instead it redirects back to the login page.</p>
  
  <p><code>AuthenticateController</code>: Login action</p>
  
  <pre><code>// POST: /Authenticate/Login
  [HttpPost]
  [AllowAnonymous]
  [ValidateAntiForgeryToken]
  public ActionResult Login(ViewModel_Login model)
  {
          // do login validation
          if (loggedin)
          {
              return View("OTPAuthentication");
          }
          else
          {
              return View(model);
          }
  }
  </code></pre>
  
  <p><code>AuthenticateController</code>: OTPAuthentication action</p>
  
  <pre><code>// POST: /Authenticate/OTPAuthentication
  [HttpPost]
  [AuthorizeUser]
  [ValidateAntiForgeryToken]
  public ActionResult OTPAuthentication(ViewModel_OTP model)
  {
          if (ModelState.IsValid)
          {
              // do OTP validation
              return this.RedirectToAction("MainMenu", "Options");
          }
          else
          {
              ModelState.AddModelError("", "The one time pin provided is incorrect.");
          }
  
          return View(model);
  }
  </code></pre>
  
  <p><code>OptionsController</code>: MainMenu action</p>
  
  <pre><code>// GET: /Options/MainMenu
  [AuthorizeUser]
  public ActionResult MainMenu()
  {
          return View();
  }
  </code></pre>
  
  <p><code>RouteConfig</code>:</p>
  
  <pre><code>routes.MapRoute(
  name: "Default",
  url: "{controller}/{action}/{id}",
  defaults: new { controller = "Authenticate", action = "Login", id = UrlParameter.Optional });
  
  routes.MapRoute(
  name: "Menu",
  url: "Menu",
  defaults: new { controller = "Options", action = "MainMenu" });
  
  routes.MapRoute(
  name: "Login",
  url: "Login",
  defaults: new { controller = "Authenticate", action = "Login" });
  
  routes.MapRoute(
  name: "OTP",
  url: "OTP",
  defaults: new { controller = "Authenticate", action = "OTPAuthentication" });
  </code></pre>