How to set a value for DateTimePicker control?
I have DateTimePicker control in form1, I want to set value in that
control from a nvarchar(50) BirthDate field from an Employee table in my
DB.
public string EmpBirthDate
{
get { return dateTimePickerBirthDate.Value.ToString(); }
set { dateTimePickerBirthDate.value = DateTime.Parse(value); }
}
But I got this error: 'System.Windows.Forms.DateTimePicker' does not
contain a definition for 'value' and no extension method 'value' accepting
a first argument of type 'System.Windows.Forms.DateTimePicker' could be
found (are you missing a using directive or an assembly reference?)
No comments:
Post a Comment