In this artcle, I’m going to show you an easy way of sending a collection from the client to the server in asp.net mvc using the hidden control and just a little jquery.
To get these lovely fruits into the html hidden input control, we need to intercept the submit event of the form, iterate over the list items and add each one to the hidden control while appending any separator of your choice, in this case I think I can simply use a comma. Don’t worry its not that difficult to accomplish.
I hope this has helped you. You can download the source here. Please leave me your comments, I’d love to hear from you.