title: Javascript, Ajax : Bad Request 400
body: <p>I'm working on ASP Net Core Project and I'm trying to send to my controller with JQuery Ajax function from a partial view modal, parameters. </p>
  
  <p>The recovered URL is correct for example : <code>http://localhost:44321/Validations/ValidationRefuse?ficheId=24&amp;commentaire=Commentaire%20de%20test</code></p>
  
  <p>But it's always : 
  <strong><em>Failed to load resource: the server responded with a status of 400 (Bad Request)</em></strong></p>
  
  <p><strong>My Javascript :</strong></p>
  
  <pre><code>    $("#buttonRefusFiche").click(function (e) {
          ficheId = $("#ficheId").val();
          commentaire = $("#inputCommentaire").val();
          $.ajax({
              url: "/Validations/ValidationRefuse?ficheId=" + ficheId + "&amp;commentaire" + commentaire,
              type: 'POST',
              contentType: 'application/html',
              cache: true,
              success: function () {
                  alert("Validation refusée.");
              },
              error: function () {
              }
          })
      });
  </code></pre>
  
  <p><strong>My C# method :</strong> </p>
  
  <pre><code>        [HttpPost]
          [ValidateAntiForgeryToken]
          public async Task&lt;IActionResult&gt; ValidationRefuse(int ficheId, string commentaire)
          { ... }
  
  </code></pre>
  
  <p><strong>My Partial View :</strong></p>
  
  <pre><code>
  &lt;div class="modal-header"&gt;
      &lt;h5 class="modal-title" id="exampleModalLongTitle"&gt;Validez-vous cette fiche ?&lt;/h5&gt;
      &lt;button type="button" class="btn btn-outline-dark btn-circle" data-dismiss="modal" aria-label="Close"&gt;
          &lt;i class="fa fa-close"&gt;&lt;/i&gt;
      &lt;/button&gt;
  &lt;/div&gt;
  &lt;form asp-controller="Validations" asp-action="ValidationParResponsable" asp-route-id="@Model.FicheId" asp-route-eId="@Model.EnseignantId"&gt;
      &lt;div class="modal-body"&gt;
          &lt;div class="form-group"&gt;
              &lt;input type="hidden" id="ficheId" asp-for="FicheId" /&gt;
              &lt;input type="hidden" asp-for="EnseignantId" /&gt;
              &lt;input type="hidden" asp-for="EtatId" /&gt;
              &lt;label class="control-label font-weight-bold"&gt;Commentaire :&lt;/label&gt;
              &lt;textarea class="form-control" id="inputCommentaire" asp-for="Commentaire" placeholder="Votre commentaire"&gt;&lt;/textarea&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="modal-footer"&gt;
          &lt;button type="button" class="btn btn-danger" id="buttonRefusFiche"&gt;Refuser&lt;/button&gt;
          &lt;button type="submit" class="btn btn-success"&gt;Valider&lt;/button&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I hope it's understandable, thanks for your responses. :) </p>