Skip to content

Instantly share code, notes, and snippets.

@dgg
Created August 30, 2013 07:28
Show Gist options
  • Save dgg/6387157 to your computer and use it in GitHub Desktop.
Save dgg/6387157 to your computer and use it in GitHub Desktop.
Model binding dynamic collections. II Collection display in a loop
<tbody>
@for (int i = 0; i < Model.Things.Length; i++)
{
<tr>
<td>
@Html.DisplayFor(m => Model.Things[i].Number)
</td>
<td>
@Html.DisplayFor(m => Model.Things[i].Text)
</td>
<td>
@Html.DisplayFor(m => Model.Things[i].IsEven)
</td>
</tr>
}
</tbody>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment