title: C# Find Control
body: <p>I am trying to access the controls on a helper class file and I can't seem to find the control.</p>
  
  <p>Code Behind:</p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
  {
      FoxHelper p = new FoxHelper();
  
      //  load page
      p.loadFoxPage(this.Page);
  }
  </code></pre>
  
  <p>Helper Class:</p>
  
  <pre><code>public void loadFoxPage(Page thePage)
  {
      //  set the master page
      m = (SiteN)thePage.Master;
  
      HtmlGenericControl ctrl = (HtmlGenericControl)thePage.FindControl("ADMMgM");
  }
  </code></pre>
  
  <p>Why can't I reference the control from the other class file.  Note:  it is not a partial class of the page.  I use this helper class for 25 different pages.</p>