In VB.NET how do you clear the Error Provider Icon from a form once it has been displayed?
Posted on 2004-04-05
I have this code:
Dim err1 as New ErrorProvider
If TextBox1.Text = ""
e.Cancel = True
err1.SetError(TextBox1, "Please Enter A Name")
e.Cancel = False
But what I want to know is how you clear the icon, if the user leaves the Textbox blank and then hits tab the error provider ICON is placed on the form next to the
Textbox control, but then if they enter a valid value and hit tab the icon stays next to the box. I don't want my users to think that there is still a problem.
I have the above code in the "Validating" event for the textbox.