How do I validate that a list box is not empty (client side)

Posted by chris on Stack Overflow See other posts from Stack Overflow or by chris
Published on 2008-09-24T15:07:39Z Indexed on 2010/05/03 17:48 UTC
Read the original article Hit count: 213

I'm working with ASP.NET 3.5. I have a list box that users must add items to (I've written the code for this). My requirement is that at least one item must be added to the listbox or they cannot submit the form. I have several other validators on the page and they all write to a ValidationSummary control. I would like this listbox validation to write to the Validation Summary control as well. Any help is greatly appreciated. Thank you.

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about validation