title: How to loop through all controls in All ASP.NET UpdatePanels in the page?
body: <p>I am using the following code to loop through my controls. The problem is that I have put all of these controls including TextBox and DropDownList inside AJAX UpdatePanel control and those panels never get reached. I have around three UpdatePanels in the page, so <strong>how can I loop through all the controls TextBox and DropDownList inside each UpdatePanel?</strong></p>
  
  <p>This code only works for one UpdatePanel:</p>
  
  <pre><code>foreach (Control c in UpdatePanel2.Controls)
          {
              foreach (Control ctrl in c.Controls)
              {
                  if (ctrl is TextBox)
                  {
                      ((TextBox)ctrl).Text = string.Empty;
                  }
              }
          }
  </code></pre>