title: how to load partial view in ajax in asp.net core
body: <p>I want to load my partial view per row when i change paging by ajax.my partial is responsible for buttons for each row in table
  i have an partial view like this below  :</p>
  
  <pre><code> @model Guid
  
  &lt;td style="width: 150px"&gt;
      &lt;div class="btn-group" role="group"&gt;
          &lt;a asp-action="Edit" asp-route-id="@Model" class="btn btn-primary text-white"&gt;&lt;i class="fas fa-edit"&gt;&lt;/i&gt;&lt;/a&gt;
          &lt;a asp-action="Details" asp-route-id="@Model" class="btn btn-success text-white"&gt;&lt;i class="fas fa-list-alt"&gt;&lt;/i&gt;&lt;/a&gt;
          &lt;a asp-action="Delete" asp-route-id="@Model" class="btn btn-danger text-white"&gt;&lt;i class="fas fa-trash-alt"&gt;&lt;/i&gt;&lt;/a&gt;
      &lt;/div&gt;
  &lt;/td&gt;
  </code></pre>
  
  <p>and i use this in my table per row :</p>
  
  <pre><code>   &lt;table id="exp" class="table table-striped border"&gt;
                  &lt;tr class="table-secondary"&gt;
                      &lt;th&gt;
                          @Html.DisplayNameFor(c =&gt; c.List.FirstOrDefault().Title)
                      &lt;/th&gt;
                      &lt;th&gt;&lt;/th&gt;
                      &lt;th&gt;&lt;/th&gt;
                  &lt;/tr&gt;
                  @foreach (var expertise in Model.List)
                  {
                      &lt;tr&gt;
                          &lt;td&gt;@Html.DisplayFor(c =&gt; expertise.Title)&lt;/td&gt;
                          &lt;td&gt;
                              &lt;partial name="_TableButtonPartial" model="@expertise.Id" /&gt;
                          &lt;/td&gt;
                      &lt;/tr&gt;
                  }
              &lt;/table&gt;
              &lt;div page-model="@Model.PagingInfo" page-classes-enabled="true" page-class="btn border"
                   page-class-normal="btn btn-light" page-class-selected="btn btn-info active"
                   class="btn-group float-right"&gt;
              &lt;/div&gt;
  </code></pre>
  
  <p>so i want to make paging ajax but i dont know how to load this patial per row in ajax</p>
  
  <pre><code>@section Scripts
  {
      @{ await Html.RenderPartialAsync("_ValidationScriptsPartial");}
      &lt;script type="text/javascript"&gt;
          function goToPage(param) {
              var url = '@Url.Content("~/")' + param;
  
              $.ajax({
                  url: url,
                  type: 'GET',
                  dataType: 'text',
                  success: function (data) {
                      var results = JSON.parse(data);
                      var items = '';
                      $('#exp').empty();
                      $.each(results.list,
                          function (i, expertise) {
                              items+= "&lt;tr&gt;" +
                                  "&lt;td&gt;" + expertise.title +
                                  "&lt;/td&gt;" +
                                  "&lt;td&gt;" +
                                  "&lt;partial name='_TableButtonPartial' model='" +
                                  expertise.id +
                                  "'/&gt;" +
                                  "&lt;/td&gt;" +
                                  "&lt;/tr&gt;";
                          });
                      $('#exp').html(items);
                  }
              });
          }
      &lt;/script&gt;
  }
  </code></pre>