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