I have a dynamic list and I need to return the selected items from view back to the controller. I have checked the link CheckboxList in MVC3 View and get the checked items passed to the controller the problem is i have a dynamic list and i need to display it horizontally so i am using
<table>
<tr>
@foreach (var item in mylist)
{
<td><img src='@item.PictureUrl'/><br />@Html.CheckBox(@item.Id,@item.checkedin)@item.Name</td>
}
</tr>
</table>
I also have a textarea in the same form.
In the controller post method, I am able to access the textarea value but not the list or checked items. please help.
Or is there any other better way to display my list and get back the checklist items?
I am new to MVC, any help would be appreciated.
Thanks