title: Remove additional route parameters for POST submit
body: <p>I have a route definition using the new MVC5 RouteAttribute that looks like this-</p>
  
  <pre><code>[HttpGet]
  [AllowAnonymous, Route("Account/ResetPassword/{user}/{token}", Name = "ResetPasswordForm")]
  public async Task&lt;ActionResult&gt; ResetPassword(int user, string token)
  </code></pre>
  
  <p>This loads a View which contains a form that allows the user to provide a new and confirmation password, and also submits the password reset token and user ID values as hidden fields. The view is accessed on a URL like -</p>
  
  <pre><code>http://www.domain.com/Account/ResetPassword/2/0tLb2N1eVc3a2dHMkxqNVlX.....
  </code></pre>
  
  <p>With the view code-</p>
  
  <pre><code>@using (Html.BeginForm("ResetPassword", "Account", FormMethod.Post, new { role = "Form" }))
  {
      @Html.AntiForgeryToken()
      &lt;h2&gt;Enter a new password below&lt;/h2&gt;
      &lt;hr /&gt;
  
      @Html.HiddenFor(m =&gt; m.User)
  
      @Html.HiddenFor(m =&gt; m.Token)
  
      &lt;div class="form-group"&gt;
          @Html.LabelFor(m =&gt; m.Password)
          @Html.PasswordFor(m =&gt; m.Password)
      &lt;/div&gt;
      &lt;div class="form-group"&gt;
          @Html.LabelFor(m =&gt; m.ConfirmPassword)
          @Html.PasswordFor(m =&gt; m.ConfirmPassword)
      &lt;/div&gt;
  
      @Html.ValidationSummary(true, "", new { role = "status" })
  
      &lt;div class="form-actions"&gt;
          &lt;input type="submit" value="Reset password" class="ui-button" /&gt;
      &lt;/div&gt;
  }
  </code></pre>
  
  <p>Having provided a defined Action and Controller I was expecting to see the URL -</p>
  
  <blockquote>
    <p>/Account/ResetPassword/</p>
  </blockquote>
  
  <p>For the form action. Instead of this I am seeing-</p>
  
  <blockquote>
    <p>/Account/ResetPassword/2/0tLb2N1eVc3a2dHMkxqNVlX.....</p>
  </blockquote>
  
  <p>The POST controller action definition looks like this-</p>
  
  <pre><code> [HttpPost]
   public async Task&lt;ActionResult&gt; ResetPassword(ResetPasswordViewModel model)
   {
  </code></pre>
  
  <p>The additional route arguments are causing the POST request to fail with a 404.</p>
  
  <p>I've tried providing "null" as the route value parameter on the BeginForm method, or specifically setting "user" and "token" to empty strings, but in all cases the original GET parameters are retained. The only workaround I have found is to change the name of the POST action entirely, in which case it is rendered as expected-</p>
  
  <pre><code>&lt;form role="Form" action="/Account/ResetUserPassword" method="post"&gt;
  </code></pre>
  
  <p>Is there a way I can keep the same action name for the POST action, but not have the BeginForm method append the extra parameters I do not need? I am prepared to explicitly write this out as a form element if necessary, but is there a way to achieve this using the built in methods? For consistency if nothing else.</p>