title: Passing parameters to ajax to call action .net core 2 don't work
body: <p>I try to passing a parameter to simply action that return a partial view in a popup, but I can't to passing the parameters, and as if it did not arrive at the action. </p>
  
  <p>I don't understand why???</p>
  
  <p>I use .net core 2.</p>
  
  <p>this my code.</p>
  
  <p>The action </p>
  
  <pre><code>[HttpPost]
  public IActionResult Detail([FromBody] string tableName, [FromBody] string code)
  {
      var row = tableBLL.GetAllByCode(tableName, code);
      return PartialView("~/Views/Table/Detail.cshtml");
  }
  </code></pre>
  
  <p>The jquery function. The value patamenter are hard coded to try the operation, after I should recover them from the table</p>
  
  <pre><code> $("#dt_basic a.details").click(function() {
                      $.ajax({
                          method: "POST",
                          url: "/Table/Detail",
                          data: JSON.stringify({
                              "tableName": "IN_COMAGREE",
                              "code": "1"
                          }),
                          //data: '{code: "' + codeId + '" }',
                          contentType: "application/json",
                          //dataType: "html",
                          success: function (response) {
                              $('#dialog').html(response);
                              $('#dialog').dialog('open');
                          },
                          failure: function (response) {
                              alert(response.responseText);
                          },
                          error: function (response) {
                              alert(response.responseText);
                          }
                      });
                  });
  </code></pre>
  
  <p>The Partial view ( very simple in this moment )</p>
  
  <pre><code> &lt;form asp-action="" class="smart-form"&gt;
          &lt;header&gt;
              Name table
          &lt;/header&gt;
  
          &lt;fieldset&gt;
              &lt;section&gt;
                  &lt;label class="label"&gt;Cod&lt;/label&gt;
                  &lt;label class="input"&gt;
                      &lt;input type="text" class="input-xs"&gt;
                  &lt;/label&gt;
              &lt;/section&gt;
  
              &lt;section&gt;
                  &lt;label class="label"&gt;Descr&lt;/label&gt;
                  &lt;label class="input"&gt;
                      &lt;input type="text" class="input-xs"&gt;
                  &lt;/label&gt;
              &lt;/section&gt;
  
          &lt;/fieldset&gt;
      &lt;/form&gt;
  </code></pre>
  
  <p>Point of the call to the function</p>
  
  <pre><code>&lt;table id="dt_basic" class="table table-striped table-bordered table-hover" width="100%"&gt;
                  &lt;thead&gt;
                      &lt;tr&gt;
                          @foreach (DataColumn col in Model.Columns)
                          {
                              &lt;th&gt;@col.ColumnName&lt;/th&gt;
                          }
                          &lt;th&gt;Action&lt;/th&gt;
                      &lt;/tr&gt;
                  &lt;/thead&gt;
                  &lt;tbody&gt;
                      @foreach (DataRow row in Model.Rows)
                      {
                          &lt;tr&gt;
                              @foreach (DataColumn col in Model.Columns)
                              {
                                  &lt;td&gt;@row[col.ColumnName]&lt;/td&gt;
                              }
                                  &lt;td&gt;
  
                                      &lt;a href="#" class="details"&gt; Edit @row[0]&lt;/a&gt;
                                      &lt;a href="#" class="btn bg-color-red txt-color-white btn-xs"&gt; Delete @row[0]&lt;/a&gt;
                                  &lt;/td&gt;
                          &lt;/tr&gt;
                      }
                  &lt;/tbody&gt;
              &lt;/table&gt;
  </code></pre>