title: How to hide controls in several panels?
body: <p>I am trying to hide all the labels in my panels (not the whole panel). 
  For the cases in which labels were just label1, label2.. I would do this (although if you know a simpler way please tell me):</p>
  
  <pre><code>for(int i=0; i&lt;3; i++){
     Panel p = this.Controls["panel"+i] as Panel;
  
     for(int j=0; j&lt;9; i++){
        if(p.Controls["label"+j]!=null) p.Controls["label"+j].Visible=false;
     }
  }
  </code></pre>
  
  <p>So in the case where my labels are lbObj, LbInt4.. how do I loop through all of them and hide them? I've tried:</p>
  
  <pre><code>foreach(Panel p in Controls) 
      foreach(Label l in p) l.Visible=false;
  </code></pre>
  
  <p>but that does not seem to work.</p>