title: asp .net displaying a grouped list of items
body: <p>I will be calling a web service and that web service will return data in this format.</p>
  
  <pre><code>&lt;element&gt;
      &lt;label&gt;Some Text&lt;/label&gt;
      &lt;items&gt;
        &lt;item&gt;1&lt;/item&gt;
      &lt;items&gt;
  &lt;/element&gt;
  &lt;element&gt;
      &lt;label&gt;Some Text 2&lt;/label&gt;
      &lt;items&gt;
        &lt;item&gt;google&lt;/item&gt;
        &lt;item&gt;mac&lt;/item&gt;
        &lt;item&gt;bus&lt;/item&gt;
      &lt;items&gt;
  &lt;/element&gt;
  &lt;element&gt;
      &lt;label&gt;Some Text 3&lt;/label&gt;
      &lt;items&gt;
        &lt;item&gt;OS&lt;/item&gt;
        &lt;item&gt;Brush&lt;/item&gt;
      &lt;items&gt;
  &lt;/element&gt;
  </code></pre>
  
  <p>Now on my asp .net web forms page, for each element I need to display a table of two columns, the left column will contain label text (for example some text). But the right column Needs to contain checkboxes and number of checkboxes will be equal to number of items in each element. And then there will be a save button for each element. Basically the idea is that user can un-select that item. So for example: for second item, the UI should look something like this:</p>
  
  <p><a href="https://i.stack.imgur.com/u76kz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/u76kz.png" alt="enter image description here"></a></p>
  
  <p>But of course there can be 100s of items. So what is the best way to do it in asp .net web forms? I thought of following:</p>
  
  <p>Create controls dynamically in the code behind and keep adding them based on the response of web service. Is there any other way to do it?</p>
  
  <p>Thanks.</p>