title: FindControl and INamingContainer
body: <p>I want to word this question carefully, so helpful people don't jump in and spend their time telling me information that I already know (I don't want to waste their time).</p>
  
  <p>I want to understand how FindControl works in ASP.NET web application projects (the ones where the c# files are referenced as CodeBehind, NOT CodeFile, in the markup).</p>
  
  <p>Code behind have two files which sit between the markup file. E.g. Default.aspx will have Default.aspx.cs and Default.aspx.designer.cs  </p>
  
  <p>If you put a button on a page, it is added to the designer file. For example:
  protected global::System.Web.UI.WebControls.LinkButton LinkButton1;</p>
  
  <p>If you want to get a reference to that control, it is immediately available as a member of the Default class. E.g. this.LinkButton1.Text = "Click Me";</p>
  
  <p>If you look at a trace for the page, it is given a unique id as per the behaviour for INamingContainers (here, the Page): ctl00$ContentPlaceHolder1$LinkButton1</p>
  
  <p>The thing I don't understand is why a null is returned by the statement:
  Control c = Page.FindControl("LinkButton1");</p>
  
  <p>I realise this is unnecessary, as the button is already available to the Default class. And this is because it appears as a member in the Default.aspx.designer.cs file.</p>
  
  <p>The thing I do not understand is <strong><em>why</em></strong> null is returned. Because the Page implements INamingContainer, and the button has an ID which correlates to that expected of a control in an INamingContainer. Isn't this exactly the kind of thing FindControl finds?</p>