I would like to post between 55 and 100 items which could be false or true from view to my controller without using Model. This is my code in Razor View:
@using(Html.BeginForm( "User","User",FormMethod.Post,new{enctype="multipart/form-data"}))
{
<input type="checkbox" name="U1">Choice one</input>
<input type="checkbox" name="U2">Choice two</input>
<input type="checkbox" name="U3">Choice three</input>
<input type="checkbox" name="U4">Choice four</input>
....
<input type="checkbox" name="U55">Choice fifty five</input>
<button type="submit">Send</button>
}
Controller:
[HttpPost]
public async Task<ActionResult> User(Array....)
{
return view();}
How can I send all of parameters (checkboxes) using an array to my controller. I appriciate all your solutions.