What is an Error Provider Control ? What is an Error Provider Control ? Give an example.

Saturday, July 18, 2009


The Error Provider control is used in windows forms to show error messages, it is like a validation control in asp.net.
Ex:
private void txtEmpName_Validating(object sender,System.ComponentModel.CancelEventArgs e)
{

if (txtEmpName.Text == "")
{

errProv.SetError (txtEmpName,"Enter Employee Name");

}

}


www.codecollege.NET

0 comments

Post a Comment

LinkWithin

Blog Widget by LinkWithin

Recommended Books