title: Trouble with FindControl and dynamicly created controls
body: <p>Example code:</p>
  
  <pre><code>    var div = new HtmlGenericControl("div");
      div.Controls.Add(new Literal() { ID = "litSomeLit" });
      var lit = (Literal)div.FindControl("litSomeLit");
      Assert.IsNotNull(lit);
  </code></pre>
  
  <p>This code fails the assert, because lit is null.  Debugging shows that div.Controls definitely contains a literal with ID of "litSomeLit."  My questions are "Why?"  and "Is there any way to get a control of a specific ID without doing a recursive search of div.Controls[] by hand one element at a time?"</p>
  
  <p>The reason I'm doing things this way is that my actual application is not so straightforward- a method I'm writing is given a complex control with several subcontrols in a number of possible configurations.  I need to access a specific control several layers down (eg, the control with ID "txtSpecificControl" might be at <code>StartingControl.Controls[0].Controls[2].Controls[1].Controls[3]</code>).  Normally I could just do <code>FindControl("txtSpecificControl")</code>, but that does not seem to work when the controls were just dynamically created (as in the above example code).</p>