Possible Duplicate:
CheckboxList in MVC3 View and get the checked items passed to the controller.
How do you create a checkboxlist in MVC3 and return the results that are checked on submit.
Asp.net MVC3
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There’s no helper built into the framework to do this for you. But it’s not that difficult. Assuming that you already have a select list in ViewBag, this will work just fine.
You view model will need to be able to accept an array, like this…
The values selected will be in
MyOptions.