title: getElementById not finding control generated by ASP.net
body: <p>I am simply trying to store a label in a variable in javascript but for some reason this isn't working with <code>document.getElementById('control');</code>. I know my javascript is linking to my html file fine because everything else works.</p>
  
  <p>Here is my javascript code:</p>
  
  <pre><code>function performEvapCooledCircuit(txt)
  {
      var error = document.getElementById('lblError');
  
  
      if (txt.value == null || isNaN(txt.value))
      {
         error.style.visibility = "visible";
      }
  }
  </code></pre>
  
  <p>Here is the html code for my label:</p>
  
  <pre><code>&lt;asp:Label ID="lblError" class="NormLabel" runat="server" 
     style="color:red; visibility:hidden;" Text="Invalid Input."&gt;&lt;/asp:Label&gt;
  </code></pre>
  
  <p>I am getting an error that says object expected??</p>