title: Finding a Control in a page from a page base class
body: <p>Hope you're having a good Friday and stuff... okay, so here's my question:</p>
  
  <p>All my ASPX pages inherit from a base class called BasePage. BasePage inherits from: </p>
  
  <pre><code>System.Web.UI.Page
  </code></pre>
  
  <p>Now, how do I access/set a control in my aspx page from my page base? I've tried this:</p>
  
  <pre><code>HyperLink hypMainMenu = (HyperLink)Page.FindControl("hypMainMenu");
  hypMainMenu.NavigateUrl = AppConfiguration.AppSettings.Urls.MainMenu;
  </code></pre>
  
  <p>But hypMainMenu is always null - I can't find the bastard. Any ideas? Or is this bad practice and someone can reccommend a better way to do this?</p>
  
  <p>Thanks in advance!</p>