TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
narasiman rao
NA
519
767k
date of birth validation
Dec 26 2012 5:00 AM
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.
Reply
Answers (
1
)
How to disable current date
saving record in database