I have several other validators on the page and they all write to a Validation Summary control. Drop in a custom validator, Add your desired error message to it, double click on the custom validator to get to the code behind for the event handler, and then you would implement server side like this: If you add a validation summary to the page, you error text should show up in that summary if there is no items in the List Box, or other collection-able control, what ever you want to use, as long as the Validation Group is the same.
I would like this listbox validation to write to the Validation Summary control as well. Actually this is the proper way to make this work (as far as the Java Script is concerned).
I recently found out that the Required Field Validator works differently for a List Box than I needed; it checks to see if a row is selected, rather than checking to see if the listbox is empty.
I tried using a Custom Validator but it does not seem to be firing (I have e.false in the validation function but still no intervention).
Net Question Answer site, specially started to allow visitors of this site ask their doubts and queries. Just click the Ask Now button and ask your question now.Does the Custom Validator also require that a row is selected?Can I use validators for this requirement or do I have to find some other way?To plan which topics to write during the next three months, our Office documentation team needed an easy way to enter values in an Excel worksheet limited only to values in a list.However, we couldn’t use Excel’s data validation feature because it only lets you select one item per cell. Adding a multi-selection list box to the worksheet.