title: How to populate asp.net CheckBoxList control via jQuery
body: <p>I have two checkboxlists on a page - Parent and Child.  Both are in seperate collapsable divs.  When the Parent's div collapses I use jquery to call a WebMethod that executes a query on the database, serializes the returned List to json, and returns it to the jquery method.</p>
  
  <p>The above all works very well and I am able to successfully get the expected json string.</p>
  
  <p>What I would like to do now is to populate the Child checkboxlist based on that json data.  Preferrably, I would like to be able to set the text and value as well (the DataTextField and DateValueField properties of the checkboxlist).</p>
  
  <p>Can anyone provide examples of how to do this?</p>
  
  <pre><code>   function RunCentralEffect() {
          $("#ParentDiv").hide('blind', 200);
          var names = [];
          $('#ParentDiv input:checked').each(function () {
              names.push(this.value);
          });
          $.ajax({
              type: "POST",
              url: "BranchReportForm.aspx/MyWebMethod",
              data: "{'args': '" + names + "'}",
              contentType: "application/json; charset=utf-8",
              dataType: "json",
              success: function (msg) {
                  alert('Success!');
                  //Now what?
              }
          });
      }
  </code></pre>
  
  <p>Thank you!</p>