title: Bind Data to Repeater using Ajax
body: <p>I want to Bind data to a <code>Repeater</code> on click of a particular <code>Button</code>.</p>
  
  <p>I can do an ajax request via jQuery and call the method to bind the data, but on the page nothing is displayed.</p>
  
  <p>This is the method I use to bind the data to the <code>Repeater</code>:</p>
  
  <pre><code>public void BindJobs()
  {
      if (RptClientDetails.Items.Count != 0) return;
      RptClientDetails.DataSource = new JobBusiness().GetJobInfoClient(ClientId);
      RptClientDetails.DataBind();
      Response.Write("myresponse");
      Response.End();
  }
  </code></pre>
  
  <p>The above method is successfully called and the data retrieved by <code>GetJobInfoClient</code>.  This is my ajax call:</p>
  
  <pre><code>function BindJobs() {
      $.ajax({
          type: "POST",
          url: "Client/Default.aspx?action=bindJobs",
          data: "{}",
          contentType: "application/json; charset=utf-8",
          dataType: "json",
          success: function (msg) {
              // Do something interesting here.
          }
      });
  }
  </code></pre>