title: findcontrol problems
body: <p>why can not I do this</p>
  
  <p>I have a data list which retrieves some data out.  if the label1 is we say 123 then a second label2 must be invisible</p>
  
  <pre><code>    Label Label1 = (Label)DataList2.FindControl("LabelName1");
      Label Label2 = (Label)DataList2.FindControl("LabelName2");
  
      if (Label1.Text == "123")
      {
          Label2.Visible = false;
      }
  </code></pre>
  
  <p>when it coms to <br>if (Label1.Text == "123")<br>
  it says 
  Object reference not set to an instance of an object.</p>