Validating the times picked by the user can be done by using the standard ASP.NET validator controls. This example shows a sample period selection page. The user has to enter two time entries.
We are using two RequiredFieldValidator instances to ensure the date pickers are not left empty.
Additionally, a custom validator is used to validate that the second time value is greater than the first. In this specific instance, the most straightforward approach would have been to use Range/Compare validators. However, they both only cater for handling values of type Date. In this case, we would need to match the time fraction of the date, and hence a more flexible approach has been used, by coupling a CustomValidator with some client script logic.