title: How to display the values from ajax success data to the html table?
body: <p>I need to view the ajax success message in my html table 
  my cshtml code is:</p>
  
  <pre><code>@*@{Customer.Models.Customers cust = ViewBag.Customers;
  }*@
  @{ 
              }
  
      &lt;center&gt;&lt;h1 style="color:red"&gt;User details&lt;/h1&gt;&lt;/center&gt;
  
  &lt;div&gt;
      &lt;table class="table"&gt;
  
          &lt;tr&gt;
              &lt;td&gt;ID&lt;/td&gt;
              &lt;td&gt;res.Id&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;FIRST NAME&lt;/td&gt;
              &lt;td&gt;res.Fname&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;LAST NAME&lt;/td&gt;
              &lt;td&gt;res.Lname&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;LOCATION&lt;/td&gt;
              &lt;td&gt;res.Location&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Contact&lt;/td&gt;
              &lt;td&gt;res.Contact&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Email&lt;/td&gt;
              &lt;td&gt;res.Email&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Password&lt;/td&gt;
              &lt;td&gt;res.Password&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Role&lt;/td&gt;
              &lt;td&gt;res.Category&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
  
      &lt;/table&gt;
  &lt;/div&gt;
  @section Scripts{
      &lt;script&gt;
              $.ajax({
                  contentType: "application/json",
                  type: "GET",
                  url: "https://localhost:44397/api/Values/Details/" + id,
                  success: function (data) {
                      alert('Welcome!');
                      res = data;
  
  
                     // window.location.href = "/Home/Details/" + data.id;
                  },
                  error: function (jqXHR, textStatus, errorThrown) {
                      $("#postResult").val(jqXHR.statusText);
                  }
              });
      &lt;/script&gt;
  }
  </code></pre>
  
  <p>Is there any way to use the success data to pass in the each table row?
  That is I want the res to store the success data and then pass it to the table fields like res.Fname (eg) and it should display the data accordingly.</p>