title: Clear Text of All Textboxes in Selected Tab
body: <p>I have a form that has a <code>tab control</code> and each tab has a number of <code>textboxes</code>,<code>labels</code> and <code>buttons</code>. I want to enable the user to clear all text in the textboxes of the selected tab.</p>
  
  <p>I have tried</p>
  
  <pre><code>    private void resetCurrentPageToolStripMenuItem_Click(object sender, EventArgs e)
      {
          foreach (TextBox t in tabControl1.SelectedTab.Controls)
          {
              t.Text = "";
          }
      }
  </code></pre>
  
  <p>The above code throw an <code>InvalidCastException</code> with the Message <code>Unable to cast object of type 'System.Windows.Forms.Button' to type 'System.Windows.Forms.TextBox</code>.</p>
  
  <p>Pls what did i do wrong and how can i correct it?</p>