Hi,
I want to disable end time based on start time selection. i am using listitem in grid
eg: Suppose I select 12:00 from start time dropdown list.
Now in end time before 12:00 all the time should be disable.
how to achieve this through c# ?
Pls help.....
ROhit chaturvedi4 pointsPosted Jul 2, 2015, 12:42 PM EDT
{ foreach ( ListItem item in EndTime.Items ) { if (DateTime.ParseExact(item.Value.ToString(), "HH:mm", CultureInfo.InvariantCulture).TimeOfDay < DateTime.ParseExact(StartTime.SelectedValue.ToString(), "HH:mm", CultureInfo.InvariantCulture).TimeOfDay) { item.Enabled = false; } else { item.Enabled = true; } } }