i have one field in design page as follows; Date of Birth textbox1(calendar image) i want to validate date of birth date should be greater than the todays date and more than the todays date. for that i write the code as follows; DateTime DOB = Convert.ToDateTime(FromDate.ToString()); if(FromDate.SelectedDateValue > DateTime.Now){Label6.Text = ("you have not born yet");}
i try the above code when i run i show the error message as follows;
Operator '>' cannot be applied to operands of type 'string' and 'System.DateTime.
for my above code please correct my code and reply.
thanks,please help me.