title: ASP.NET Custom Controls - Composites
body: <h2>Summary</h2>
  <p>Hi All,<br />
  OK, further into my adventures with custom controls...</p>
  <p>In summary, here is that I have learned of three main &quot;classes&quot; of custom controls. Please feel free to correct me if any of this is wrong!</p>
  <ol>
  <li><strong>UserControls</strong> - Which inherit from <em>UserControl</em> and are contained within an <em>ASCX</em> file. These are pretty limited in what they can do, but are a quick and light way to get some UI commonality with designer support.</li>
  <li><strong>Custom Composite Controls</strong> - These are controls that inherit from <em>WebControl</em> where you add pre-existing controls to the control within the <em>CreateChildControls</em> method. This provides great flexibility, but lack of designer support without additional coding. They are highly portable though since they can be compiled into a DLL.</li>
  <li><strong>Custom Rendered Controls</strong> - Similar to Custom Composite Controls, these are added to a Web Control Library project. The rendering of the control is completely controlled by the programmer by overriding the <em>Render</em> method.</li>
  </ol>
  <h2>My Thoughts..</h2>
  <p>OK, so while playing with custom composites, I found the following:</p>
  <ul>
  <li>You have little/no control over the HTML output making it difficult to &quot;debug&quot;.</li>
  <li>The <em>CreateChildControls</em> (and subsequent methods) can get real busy with <em>Controls.Add(myControl)</em> everywhere.</li>
  <li>I found rendering tables (be it for layout or content) to be considerably awkward.</li>
  </ul>
  <h2>The Question(s)..</h2>
  <p>So, I admit, I am new to this so I could be way off-base with some of my points noted above..</p>
  <ul>
  <li>Do you use Composites?</li>
  <li>Do you have any neat tricks to control the HTML output?</li>
  <li>Do you just say &quot;to hell with it&quot; and go ahead and create a custom rendered control?</li>
  </ul>
  <p><strong>Its something I am keen to get really firm in my mind since I know how much <em>good</em> control development can cut overall development time.</strong></p>
  <p>I look forward to your answers ^_^</p>