Have a form which includes a drop down list and a text box for the users to select a time or to enter one manually. I need validation so that if the user enters a time and selects a time from the list or if they don't use either that it will appear as an error. Just wondering what type of validation I would use here?

4 Years
Discussion Span
Last Post by JorgeM

So based on what i am understanding about your description, the user can either make a selection from a dropdown list or manually input the the information in a textbox. You may want to consider disabling the alternate control. For example, if the user makes a selection from the dropdown list, disable the textbox. If the user clicks in the textbox, disable the dropdown list.

If the user inputs data in the dropdown list, use a RegularExpressionValidator. To use this type of validation, you'll need to be familiar with RegEx.

If you want to keep it as simple as possible and ensure that the data that is submitted is controlled, stick with a dropdown list so there is no manual input.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.