How do I get all values from a listbox that are not selected in ASP.NET MVC
- by Nick Reeve
Hello,
I have a form that (amongst other things) contains 2 multi-select listboxes. Basically you can add items to the one on the right from the full list of items on the left using some add/remove buttons.
The problem is that I cannot see a way of picking up the contents of the listbox when posting back to the controller.
I have followed this example:
http://ittecture.wordpress.com/2009/04/30/tip-of-the-day-198-asp-net-mvc-listbox-controls/
This works fine if you have actually selected the items in the listbox before posting. That's not really the way I think this UI should behave though.
Hope that makes sense,
Nick