How can I create a checkboxList in asp.net MVC and then to handle the event with the checkboxList
Share
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.
You could have a view model:
A controller:
A View (
~/Views/Home/Index.cshtml):and the corresponding Editor template (
~/Views/Home/EditorTemplates/MyViewModel.cshtml):Now when you submit the form you would get a list of values and for each value whether it is checked or not.