I am doing my project in MVC4 using c#. I have an IEnumerable list in my model. I use the following loop to list that in my view.
<table id="memberlist">
<tbody>
@foreach(var item in Model)
{
<tr>
<td>Rtn. @item.Mem_NA<br />(@item.Mem_Occ)</td>
</tr>
}
</tbody>
</table>
Actually i want the output like in the following table
<table id="memberlist">
<tbody>
<tr>
<td>Rtn.item.Mem_NA1<br />(item.Mem_Occ1)</td>
<td>Rtn.item.Mem_NA2<br />(item.Mem_Occ2)</td>
<td>Rtn.item.Mem_NA3<br />(item.Mem_Occ3)</td>
</tr>
<tr>
<td>Rtn.item.Mem_NA4<br />(item.Mem_Occ4)</td>
<td>Rtn.item.Mem_NA5<br />(item.Mem_Occ5)</td>
<td>Rtn.item.Mem_NA6<br />(item.Mem_Occ6)</td>
</tr>
</tbody>
</table>
Is that possible for generating a table like above using a foreach loop. or is better using the div instead of table. Please help me