title: How to reload view after AJAX POST
body: <p>Being new to AJAX I have encountered this problem and have had no luck resolving it. I want my table to be refreshed after an ajax post to review an object, everything I've tried has been futile. 
  <p>Assume the ajax response is a JSON result, to avoid posting my <code>OnPost()</code> code.
  I send the <strong>Id</strong> of the product using ajax and then use that <strong>Id</strong> to remove the product
  <p> I then call the same method <code>OnGet()</code> uses to populate the tables which returns the updated list. In chrome debug tools I see the response successfully returns with the updated list. I just don't know how to get it across back to my list. Thanks in advance guys.</p>
  
  <h2></h2>
  
  <pre><code>    @Html.AntiForgeryToken()
  &lt;table id="shoppingBag" class="table"&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th scope="col"&gt;Item&lt;/th&gt;
              &lt;th scope="col"&gt;Price&lt;/th&gt;
              &lt;th scope="col"&gt;Quantity&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          @foreach (var item in Model.ShoppingBagItems)
          {
              &lt;tr&gt;
                  &lt;td&gt;
                      @item.Product.Name
                  &lt;/td&gt;
                  &lt;td&gt;
                      @item.Price.ToString("C")
                  &lt;/td&gt;
                  &lt;td&gt;
                      &lt;input value="@item.Quantity" size="1" maxlength="1" class="text-center" /&gt;
                  &lt;/td&gt;
                  &lt;td&gt;
                          &lt;button onclick="remove(@item.Product.Id.ToString())" class="close"&gt;
                              &lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;
                          &lt;/button&gt;
                  &lt;/td&gt;
              &lt;/tr&gt;
          }
      &lt;/tbody&gt;
  &lt;/table&gt;
  
  &lt;script&gt;
      function remove(id) {
          $.ajax({
              type: 'POST',
              url: 'ShoppingBag?handler=Delete',
              headers: {
                  "XSRF-TOKEN": $('input:hidden[name="__RequestVerificationToken"]').val()
              },
              contentType: 'application/json; charset=utf-8',
              dataType: 'json',
              data: ''+id+'',
              sucess: function (response) {
                  append_json(response);
              }
          });
      }
  
      function append_json(data){
          var table = document.getElementById('shoppingBag');
          data.forEach(function(object) {
              var tr = document.createElement('tr');
              tr.innerHTML = '&lt;td&gt;' +
                  object.product.name +
                  '&lt;/td&gt;' +
                  '&lt;td&gt;' +
                  object.price +
                  '&lt;/td&gt;' +
                  '&lt;td&gt;' +
                  object.quantity +
                  '&lt;/td&gt;';
              table.appendChild(tr);
          });
      }
  &lt;/script&gt;
  </code></pre>