title: How to set a label control in a master page from a utility class
body: <p>I have a class named <code>utility</code> in my App_code folder that holds the logic to set a labels text.</p>
  
  <pre><code>public void Mgr_BreadCrumbs(string text)
      {
          Manager.MasterPages.Master master = new Manager.MasterPages.Master();
  
          Label lblHeader = (Label)master.FindControl("lblHeader");
          lblHeader.Text = text;
      }
  </code></pre>
  
  <p>And then in each of my pages I was trying to set it like this:</p>
  
  <pre><code>        utility u = new utility();
          u.Mgr_BreadCrumbs("Categories");
  </code></pre>
  
  <p>I'm getting am object reference not set to an instance of an object on the <code>lblHeader.Text = text;</code> line of code.</p>