title: Why is asp-route-id not working in my form post?
body: <p>I have asp-route-id working in one instance:</p>
  
  <p>It works from an anchor tag like this:</p>
  
  <pre><code>&lt;a id="editModal" data-toggle="modal" data-target="#modal_box"
      class="btn btn-sm btn-primary"
      asp-action="Edit" asp-route-id="@user.Id"&gt;Edit&lt;/a&gt;
  </code></pre>
  
  <p>and is received like this:</p>
  
  <pre><code>public async Task&lt;PartialViewResult&gt; DeleteConfirm(string Id) =&gt;
          PartialView("_DeleteConfirm", await _userManager.FindByIdAsync(Id));
  </code></pre>
  
  <p>This method receives the correct id.</p>
  
  <p>The next example has the route id in the form tag like this:</p>
  
  <pre><code>&lt;div class="modal-footer"&gt;
      &lt;form asp-controller="Account" asp-action="Delete" asp-route-id="@Model.Id" method="post"&gt;
          &lt;button type="submit" class="btn btn-primary"
             asp-action="Delete"&gt;Yes - Delete this User&lt;/button&gt;
          &lt;a asp-action="Index" class="btn btn-default"&gt;Cancel&lt;/a&gt;
      &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and I am trying to receive the Id here:</p>
  
  <pre><code>    [HttpPost]
      public async Task&lt;IActionResult&gt; Delete(string Id)
      {
          AppUser user = await _userManager.FindByIdAsync(Id);
          if (user != null)
          {
              IdentityResult result = await _userManager.DeleteAsync(user);
              if (result.Succeeded)
              {
                  return RedirectToAction("Index");
              }
              else
              {
                  AddErrorsFromResult(result);
              }
          }
          else
          {
              ModelState.AddModelError("", "User Not Found");
          }
          return View("Index", _userManager.Users);
      }
  </code></pre>
  
  <p>But in this case the parameter is coming in null.</p>
  
  <p>It should work from the from tag.  I got this from the first Identity Chapter in Adam Freemans APress MVC Core book and it worked when I typed it in for that example.</p>