title: Adding an attribute to a ListItem, not rendering styles
body: <p>I have a checkboxlist on a page as below. </p>
  
  <pre><code>   &lt;asp:CheckBoxList runat="server" ID="lstFeatures" RepeatDirection="Vertical"&gt;&lt;/asp:CheckBoxList&gt;  
  </code></pre>
  
  <p>The backend code looks like so. </p>
  
  <pre><code>    private void MakeRegionCheckboxes(ReportRegion region, int margin)
      {
          foreach (ReportRegion subregion in region.childRegions)
          {
              ListItem item = new ListItem();
              item.Text = subregion.Name;
              item.Value = subregion.Name;
              item.Selected = subregion.DefaultSelection;
              item.Attributes.Add("style", "margin-left:" + margin.ToString() + "px");
              lstFeatures.Items.Add(item);
  
              MakeRegionCheckboxes(subregion, margin + 30);
          }
      }
  </code></pre>
  
  <p>When this runs on a blank project, it indents the "subregions" nicely as the style:margin-left:30px gets rendered in a span as you can see. </p>
  
  <pre><code>&lt;td&gt;
    &lt;span style="margin-left:30px"&gt;
    &lt;input id="lstFeatures_1" type="checkbox" checked="checked" name="lstFeatures$1"&gt;
    &lt;label for="lstFeatures_1"&gt;Member Information&lt;/label&gt;
    &lt;/span&gt;
  &lt;/td&gt;
  </code></pre>
  
  <p>However, when I run the <strong>same</strong> code in my main project it doesn't render the spans and therefore the margin isn't getting set. All I get is this. </p>
  
  <pre><code>&lt;td&gt;
     &lt;input id="ctl00_pg_BuildReport_lstFeatures_1" type="checkbox" checked="checked" name="ctl00$pg$BuildReport$lstFeatures$1"&gt;
     &lt;label for="ctl00_pg_BuildReport_lstFeatures_1"&gt;Member Information&lt;/label&gt;
  &lt;/td&gt;
  </code></pre>
  
  <p>It's the same framework on both projects (3.5) the only difference is the main project has a masterpage, and maybe some extra panels, but I just wondered what would stop the span on getting rendered? Any help would be useful. Thanks!</p>