title: How to use for loop to scan all controls in ASP .NET page?
body: <pre><code>foreach (Control ctrl in Page.Controls) 
      {
          if (ctrl is TextBox)
          {
              if (((TextBox)(ctrl)).Text == "")
              {  
                 helpCalss.MessageBox("Please fill the empty fields", this);
                      return;  
              }  
          }  
      }  
  </code></pre>
  
  <p>I'm using asp.net and i have an inserting page with texboxes and i need to check if the texboxes in the page are empty and if so i need to show a message box with the empty textbox</p>