Dates problems
i have one form in which i have to give dates. in that i have to give the activation date and the expiry date, but what i want to do is that the activation date should be less than the expiry date and also tell me where to write the code in the form. Because i cannot give any condition under the save button. because if i do there then the save button is not working properly. do help
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Master BillaRank #2,229 · 630 reputationPosted Sep 18, 2009, 6:29 AM EDT
Just write function to this and return Boolean value from the function
private bool IsValidDate(DateTime sdate, DateTime edate)
{
if (sdate.CompareTo(edate) > 0)
{
return false;
}
return true;
}
Just call this function within the save button click event.
Thank you