title: Why is the Enabled property of a custom CompositeControl still setting disabled="disabled" when the property is overridden?
body: <p>I have created a custom server control that inherits from CompositeControl.  In the CreateChildControls method, I add an input and a label control (there are others, too) to the control tree.  I have overridden the Enabled property so that I only get/set the input's Enabled property, not the composite control's Enabled property.  In the user control where I use this server control, I add <code>Enabled="false"</code> to the markup.  However, no matter what I do, the container div gets a <code>disabled="disabled"</code> attribute added to it (and so do some of the children).  </p>
  
  <p>Of course, this seems to work just fine in all browsers except IE 6.  If there's a fieldset legend or a radio button list inside the disabled control, the text disappears.  I was originally trying to see if there was some defect to fix via CSS for IE 6.  Then, I noticed the <code>disabled="disabled"</code> on tags I didn't even think were valid to have that attribute.</p>
  
  <p>What exactly am I doing wrong here?</p>
  
  <p>Sample control that exhibits behavior:</p>
  
  <pre><code>public class TextBoxWithLabel : CompositeControl
  {
      private readonly Label _label = new Label();
      private readonly TextBox _textBox = new TextBox();
  
      protected override HtmlTextWriterTag TagKey
      {
          get { return HtmlTextWriterTag.Div; }
      }
  
      public string LabelText
      {
          get { return _label.Text; }
          set { _label.Text = value; }
      }
  
      public override bool Enabled
      {
          get { return _textBox.Enabled; }
          set { _textBox.Enabled = value; }
      }
  
      protected override void CreateChildControls()
      {
          _label.ID = ID + "_label";
          _textBox.ID = ID + "_field";
          _label.AssociatedControlID = _label.ID;
  
          Controls.Add(_label);
          Controls.Add(_textBox);
      }
  }
  </code></pre>
  
  <p>Usage:</p>
  
  <pre><code>&lt;test:TextBoxWithLabel id="tester" runat="server" LabelText="My TextBox" Enabled="false" /&gt;
  </code></pre>