Validate particular control in datalist
Posted on 2006-11-30
I have a datalist control which lists two types of items. One of the items displays a dropdown list for selecting a value. The datalist also includes a button and a RequiredFieldValidator. The RequiredFieldValidator validates the dropdown list value. The problem is if the item type showing the drop down list is chosen and a value is not entered then the validation applies to every instance of that type of item. Is it possible to make the RequiredFieldVlidator only validate the selected items control or if not how would this be done using custom code?