title: Set visible of a label from code behind
body: <p>In asp.net I have this label:</p>
  
  <pre><code>&lt;asp:Label ID="Label3" runat="server" Text="0" visible='&lt;%# visibleCredits() %&gt;'&gt;&lt;/asp:Label&gt;
  </code></pre>
  
  <p>In code behind I have:</p>
  
  <pre><code>protected bool visibleCredits()
  {
      return false;
  
  }
  </code></pre>
  
  <p>But the label is always shown, it should be invisible I think. Please don't ask why I did not set: </p>
  
  <blockquote>
    <p>Label3.Visible = visibleCredits();</p>
  </blockquote>
  
  <p>from the code behind.</p>