Permalink

The code looks fine for to me. Are you saying that errorProvider.GetError() does not return "Required field" when some fields are empty? I can't see you outputting the value anywhere?

Try the documentation http://msdn.microsoft.com/en-us/library/system.windows.forms.errorprovider.aspx#Y3115

Also you may want to change ErrorProvider1.SetError(c, "") to ErrorProvider1.SetError(c, String.Empty)

The content of this field is kept private and will not be shown publicly.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.