I have two template coloumns, one contains a checkbox, the other a dropdownlist. I would like to apply validation so that when the user selects the checkbox the dropdownlist value can't be nothing.
I used the requiredfieldvalidator but cannot get the validation to link up with the checkbox.
Any ideas ?Try hooking it up in the OnItemDataBound event - this will let you do it Server side...you could also hook it up do the Checkbox did an Autopostback, this would let you validate the DDL client side as well (since so far as I'm aware you can't do 'conditional' validation in ASP.NET - well I never tried, but I can't think for the moment how you would without generating your own clinet-side validation code).
No comments:
Post a Comment