title: Find dynamically created controls inside Literal in asp.net page
body: <p>Following is my code</p>
  
  <p>-- the .aspx file</p>
  
  <pre><code>&lt;div id="testDiv" runat="server"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>-- the .aspx.cs file</p>
  
  <pre><code>Literal lit1 = new Literal();
  lit1.Text = "&lt;table class='allocTable'&gt;";
  lit1.Text += "&lt;tr&gt;&lt;td&gt;&lt;input type='text' runat='server' id='testbox1'&gt;&lt;/input&gt;&lt;/td&gt;&lt;/tr&gt;";
  ... some other controls &lt;tr&gt;&lt;td&gt;...
  lit1.Text += "&lt;/table&gt;"
  testDiv.Controls.Add(lit1);
  </code></pre>
  
  <p>Now how can I find testbox1 in the .aspx.cs file? I have used FindControl on testDiv and the placeHolder but it returns null.</p>
  
  <p>It seems the textboxes have not been added to the page control but they have just been rendered.</p>