title: How do I disable all controls in ASP.NET page?
body: <p>I have multiple dropdownlist in a page and would like to disable all if user selects a checkbox which reads disable all. So far I have this code and it is not working. Any suggestions?</p>
  
  <pre><code>foreach (Control c in this.Page.Controls)
  {
      if (c is DropDownList)
          ((DropDownList)(c)).Enabled = false;
  }
  </code></pre>