ASP.NET: What's the best way to validate 3 drop downs boxes that are used to select a date (month, d

Posted by Josh on Stack Overflow See other posts from Stack Overflow or by Josh
Published on 2010-05-30T02:07:09Z Indexed on 2010/05/30 2:12 UTC
Read the original article Hit count: 216

Filed under:
|

I have two sets of drop downs for start date and end date. Each date is created by selecting a month, day, and year from 3 separate drop downs. I currently have RequiredFieldValidators on all the drop downs (which just shows a * if nothing has been selected yet), but I need to validate that the end date is greater than the start date. I can take care of the logic behind comparing the dates, but in terms of the validation method used, can someone help me out (I essentially need to validate 6 drop downs all at one time)? I tried a custom validation using client side javascript but couldn't get it to work. Can you even validate multiple drop downs using ASP.NET validation controls? (which is what I would like to do - I can always write the javascript, but was trying to stay away from this).

Thanks.

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about validations