I'm new to MVC3 and I can't figure out how to use checkboxes in MVC. I have a bunch of text in my view like
text1
text2
text3
text4
text5
submitbutton
This text is not related to any model its just plain text. I would like to place a checkbox for each item and a link it to the controller so that when a user selects some of the checkbox values and clicks on the submit button my controller picks up which items have been selected. I tried using @html.checkbox("text"+ index) and tried the controller to be
[HttpPost]
public ActionResult controller(List<string> list)
{
}
But that doesn't pick up the list of selected items. Can you tell me what i'm doing wrong or another way to do it?