title: Asp.net Mvc jquery ajax?
body: <p>I have links like following.</p>
  
  <pre><code>&lt;a href="/Customer/_EditCustomer?CustomerId=2" class="customer_details"&gt;Deneme Müşteri 2&lt;/a&gt;
  &lt;a href="/Customer/_EditCustomer?CustomerId=3" class="customer_details"&gt;Deneme Müşteri 2&lt;/a&gt;
  </code></pre>
  
  <p>I want to use jquery ajax post like this:</p>
  
  <pre><code>$(".customer_details").click(function () {
      $.ajax({
          url: $(this).attr("href"),
          type: 'POST',
          beforeSend: function () {
  
          },
          complete: function () {
  
          },
          success: function (result) {
              $("#customer_operations_container").html(result);
          },
          error: function (result) {
              alert("Hata!");
          }
      });   //end ajax
  });
  </code></pre>
  
  <p>Or this:</p>
  
  <pre><code>$(".customer_details").click(function () {
      $("#customer_operations_container").load($(this).attr("href"));
  });
  </code></pre>
  
  <p>And Action Method</p>
  
  <pre><code>public ActionResult _EditCustomer(int CustomerId)
  {
      // get customer from db by customer id.
      return PartialView(customer);
  }
  </code></pre>
  
  <p>But I cant do what I wanted. When I click to link, PartialView does not load. It is opening as a new page without its parent. I tried prevent.Default but result is the same.</p>
  
  <p>How can I load the partialView to into a div?</p>
  
  <p>Note: If I use link like this <code>&lt;a href="#"&gt;</code> it works.</p>
  
  <p>Thanks.</p>