ActivEarth.Competition.Contests.ContestCreationPage.ValidateEndDate C# (CSharp) Method

ValidateEndDate() protected method

Used to validate that the end date of a contest is on or after the start date.
protected ValidateEndDate ( object source, ServerValidateEventArgs args ) : void
source object
args ServerValidateEventArgs
return void
        protected void ValidateEndDate(object source, ServerValidateEventArgs args)
        {
            DateTime startDate = DateTime.Parse(txbContestStartDate.Text);
            DateTime endDate = DateTime.Parse(args.Value);
            args.IsValid = (startDate <= endDate);
        }