Author: blink18jew | Posted on: 4/14/2009 6:26:48 PM | Views : 431

Hey, im making a page for users to enter the start / end date and time of their events. To do this i have two textboxes linked with the Ajax Calendar Control for the date and a dropdownbar filled with times like : Text = '1 PM' Value = '13:00:00 PM'.



When i click my linkbutton to validate, i tried converting the Start Date Textbox and dropdownbar time to a datetime like this



DateTime StartTime = Convert.ToDateTime(StartBox.Text + " " + StartTime.SelectedItem.Value.ToString());



I did the same for the End time, and tried to get the TimeSpan between them, if the TotalMinutes was more than one, the dates weren't valid as the end time is ahead of the start time. My problem is it will not let me convert the textbox value and the dropdownbar value to a datetime, also my users can type characters into the textbox after selecting the time for their event. I set the two textboxes ReadOnly values to true, and then the val ...

Go to the complete details ...