In my application there are 4 date fieds ....
in those i want to display error messge when the invalid date is entered...
for that how how can i check whether the entered date is valid or invalid...
plz help me,,,,
Thanks In Advance,
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Dharmendra Singh178 reputationPosted May 1, 2013, 9:23 PM EDT
Sathish Pabbathi99 reputationPosted May 1, 2013, 9:25 PM EDT
Dharmendra Singh178 reputationPosted May 1, 2013, 9:38 PM EDT
Sathish Pabbathi99 reputationPosted May 1, 2013, 10:00 PM EDT
string DateOfBirth = "";
Dharmendra Singh178 reputationPosted May 1, 2013, 10:23 PM EDT
Dharmendra Singh178 reputationPosted May 1, 2013, 10:27 PM EDT
if (txtEmpDtofBirth.Text.Trim().Length > 0)
{
DateOfBirth = DateTime.ParseExact(txtEmpDtofBirth.Text, "MM/dd/yyyy", CultureInfo.InvariantCulture).ToString();
}
else
{
ScriptManager.RegisterStartupScript(this, GetType(), "showlalert", "alert('Invalid Joining Date');", true);
}
manjula d131 reputationPosted May 1, 2013, 10:52 PM EDT