David Smith

David Smith

  • NA
  • 2k
  • 0

C# standard error provider

Sep 25 2011 9:05 AM

How do you clear provider on a specific textbox and not all textsboxes. when I call errorProvider1.clear() It clears all the textboxs that contains the property of errorProvider1. I just want a specific textbox.

  if((!calculaterValidation.IsDoubleNumberValid(billTotalTextBox.Text)) || (string.IsNullOrEmpty(billTotalTextBox.Text)))
  {
  errorProvider1.SetIconAlignment(billTotalTextBox, ErrorIconAlignment.MiddleRight);
  errorProvider1.SetError(billTotalTextBox, "Please enter a valid number.");
  }
  else
  {
  //Clear validation of text box
  }

Answers (2)