ASP.NET MVC - Add Query String Value to RedirectToAction in Controller
<p>I have an ASP.NET MVC app. My app is using T4MVC. In my controller, I need to redirect from one action to another. When I do this, I want to append a query string value. I can successfully redirect without the query string value, but I've been unsuccessful applying a query string value. My actions look like this:</p>

<pre><code>[HttpPost]
[ValidateAntiForgeryToken]
public virtual ActionResult Action1()
{                        
   return RedirectToAction(MVC.MyController.Action2().AddRouteValue("id", "5"));
}

[Route("action-2")]
public virtual ActionResult Action2(string input)
{
  ViewBag.Input = input;
  return View(viewModel);
}
</code></pre>

<p>The <code>Action2</code> works fine when I visit <code>./action-2</code>. I can also successfully POST to <code>Action1</code>. But, when the redirect doesn't work. I notice in the address bar the following:</p>

<pre><code>/MyController/id
</code></pre>

<p>Why? How do I fix this? I just want to redirect back to <code>Action2</code> but this time with a query string parameter added. What am I missing?</p>