What is errorprovider?

 Posted by Ddd on 2/9/2011 | Category: Others Interview questions | Views: 2896 | Points: 40
Answer:

It is a control that is used to display blinking error message in a tooltip when some
control (example : a textbox) has invalid data.
Code snippet:

private void button1_Click(object sender, EventArgs e)

{
if (textBox1.Text == "")
{
errorProvider1.SetError(textBox1, "please enter");
}
else
{
errorProvider1.SetError(textBox1, "");

}
}


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response