How to add CheckBox, Label and DDL to ASP.NET page programmatically?
<p>I am trying to add a check box, label and DDL to ASP.NET page (aspx) from my back class in C#. I have been using  <code>LiteralControl _liText = new LiteralControl();</code> to attach label so that I can show them using <code>this.Controls.Add(_liText);</code>in CreateChildControls() method. </p>

<p>How do I add DDL and check box to ASp.NET page from C# code so that my label is in the same line with DDL and checkbox?</p>

<p>I have already made DDL using this syntax:</p>

<pre><code>List&lt;DropDownList&gt; _ddlCollection=new List&lt;DropDownList&gt;();
for (int i = 0; i &lt; 5; i++)
            {
                _ddlCollection.Add(new DropDownList());
            }
</code></pre>

<p>Problem is not in this.Controls.Add() which I call from CreateChildControls(). It is OnPreRender() method where I fill ddl and check box. Is LiteralControl class good for  this? Here is what I have tried in OnPReRender():</p>

<pre><code> foreach (SPList list in web.Lists)
            {
                if (!list.Hidden)
                {
                    _liText.Text += @&lt;input type="checkbox"&gt;;
                    _liText.Text += list.Title + "&lt;br /&gt;";

                }
            }
</code></pre>
