title: How call the Text_Changed Event for multiple text box controls on a form in C# winforms
body: <p>I have form that has about 20 <code>TextBox</code> controls and I would like to fire the <code>Text_Changed</code> event with out adding the event for each individual text box. Is there a way to loop through the text boxes to fire this event? What I am trying to do is clear a label control when the text changes. Instead of displaying a message box, for error descriptions, I use a label control to display the message. I also set it up where if a text box has invalid data, I select all text and give focus to that <code>TextBox</code> so when user re-enters information the label control clears the message. </p>
  
  <p>Edit:</p>
  
  <p>To clear up some confusion, here is some of my code from my validation method</p>
  
  <pre class="lang-cs prettyprint-override"><code>if (txtBentLeadsQty.Text == "")
  {
      //ValidData = true;
      BentLeadsCount = 0;
  }
  else 
  {
      if (int.TryParse(txtBentLeadsQty.Text.Trim(), out BentLeadsCount))
          ValidData = true;
      else
      {
          ValidData = false;
          lblError.Text = "Bent Lead Qty must be a numeric value";
          txtBentLeadsQty.SelectAll();
          txtBentLeadsQty.Focus();
      }
  }
  </code></pre>
  
  <p>I already have a way to check for numeric values, and I put code in to select all text entered and gave focus if the values are not numeric, I just want to have a way to clear the <code>Label</code> control when the the text is changes like if the user hit backspace or starts typing that why if the error occurs, I highlight all the text in that <code>TextBox</code> if it is not valid. I can do this if I put code in every text boxes <code>TextChanged</code> event, but to save coding I was wondering if there is way to clear the label control if any of the text boxes throws an error from my validation method instead of adding individual events for 20 text boxes.</p>
  
  <p>Note: Not all text boxes will have data entered, these are quantity text boxes I put code in to assign a 0 to the variable if the <code>TextBox</code> in null. </p>