To display a series of textbox in table, can use following code

Code
<% foreach (var item in Model) { %>
<tr>
<td> <input type=checkbox id="<%=item .XXX_ID %>" name="CB>" value="true">
</td>
</tr>
<% } %>
In order to get the ID which boxes are checked, it need use same "name" property.In this case, the name is "CB". And then in Action, just use

Code
string[] CB= Request.Form.GetValues("CB");
// or just in action method add this peremeter: string[] CB
For Check All button. Just use the following scripts in your view page.

Code
<input type="checkbox" id="CheckAll" name= "SA" value="CheckAll" onclick=select('CB')>

<script language="javascript">
function select(a){
o=document.getElementsByName(a)
f=document.getElementsByName('SA')
for(i=0;i<o.length;i++)
o[i].checked=f[0].checked;
}
</script>