Which two action should you perform?

You are creating a Windows Forms application. You add an ErrorProvider component named erpErrors and a DateTimePicker control named dtpStartDate to the application.
The application also contains other controls.
You need to configure the application to display an error notification icon next to dtpStartDate when the user enters a date that is greater than today’s date.
Which two action should you perform?
(Each correct answer presents part of the solution. Choose two.)

You are creating a Windows Forms application. You add an ErrorProvider component named erpErrors and a DateTimePicker control named dtpStartDate to the application.
The application also contains other controls.
You need to configure the application to display an error notification icon next to dtpStartDate when the user enters a date that is greater than today’s date.
Which two action should you perform?
(Each correct answer presents part of the solution. Choose two.)

A.
For the Validating event of dtpStartDate, create an event handler named VerifyStartDate.

B.
For the Validated event of dtpStartDate, create an event handler named VerifyStartDate.

C.
In the Properties Window for dtpStartDate, set the value of Error on erpErrors to Date out of range .

D.
In VerifyStartDate, call erpErrors.SetError(dtpStartDate, "Date out of range") if the value of dtpStartDate value is greater than today’s date.

E.
In VerifyStartDate, call erpErrors.SetError(dtpStartDate, null) if the dtpStartDate.Value is greater than today’s date.



Leave a Reply 0

Your email address will not be published. Required fields are marked *