Why to use FindControl...?
<p>I was facing an issue where i was adding textboxes dynamically to a placedHolder.</p>

<p><strong>placeHolder Declaration:</strong></p>

<pre><code>&lt;asp:PlaceHolder ID="phTextBoxes" runat="server" &gt;
  &lt;/asp:PlaceHolder&gt;
</code></pre>

<p><strong>Assignment of TextBoxes</strong></p>

<pre><code> ...if (phTextBoxes!= null) phTextBoxes.Controls.Add(txt);
</code></pre>

<p>But when i build the application i got the error</p>

<p><strong>The name 'phTextBoxes' does not exist in the current context</strong>
I have solved the issue by using <strong>FindControl()</strong> like below.</p>

<pre><code>PlaceHolder phtxt = (PlaceHolder)form1.FindControl("phTextBoxes");
</code></pre>

<p>and then added control to phtxt.
The error is gone.
But i would like to know why was the old placeHolder giving an error and how did the FindControl found it.</p>
