title: How to redirect to another action using jquery ajax
body: <p>I have a view in my asp.net mvc 5 application, where the view shows a table with all orders that customers gave in. I want to make that when a user clicks on a row in the table, to redirect to a "details" action displaying all details about the order using jquery. This is my view..</p>
  
  <pre><code>&lt;table class="table table-striped table-bordered"&gt;
  &lt;tr&gt;
      &lt;td&gt;Customer Name&lt;/td&gt;
      &lt;td&gt;Phone Number&lt;/td&gt;
      &lt;td&gt;Watch Model&lt;/td&gt;
      &lt;td&gt;Order Status&lt;/td&gt;
      &lt;td&gt;Order Location&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tbody&gt;
      @foreach (var order in Model.Repairs)
      {
          &lt;tr class="row-click" data-repair-id="@order.Id"&gt;
              &lt;td&gt;@order.Customer.GetName()&lt;/td&gt;
              &lt;td&gt;@order.Customer.PhoneNumber&lt;/td&gt;
              &lt;td&gt;@order.Watch.Model&lt;/td&gt;
              &lt;td&gt;@order.Status&lt;/td&gt;
              &lt;td&gt;@order.Location&lt;/td&gt;
          &lt;/tr&gt;
      }
  &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>and this is my jQuery</p>
  
  <pre><code>@section scripts
  {
   &lt;script&gt;
   $(document).ready(function(e) {
      $(".row-click").on("click",
          function() {
              var element = $(this);
  
              $.ajax({
                  type: "GET",
                  url: '@Url.Action("Details", "Repairs")',
                  data: { id: element.data("repair-id") }
              });
           });
      });
   &lt;/script&gt;
  }
  </code></pre>
  
  <p>and this is the action in "Repairs Controller</p>
  
  <pre><code> public ActionResult Details(int id)
      {
          var repair = _context.Repairs.SingleOrDefault(r =&gt; r.Id == id);
          return View(repair);
      }
  </code></pre>
  
  <p>And the problem is that when I click on the row nothing happens.</p>