Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
@model List<ModelListBinding.Models.Person>
<form asp-action="Save" method="post" role="form">
<th><label asp-for="@Model[0].FirstName" class="control-label"></label></th>
<th><label asp-for="@Model[0].LastName" class="control-label"></label></th>
<th><label asp-for="@Model[0].Birthday" class="control-label"></label></th>
<th><label asp-for="@Model[0].IsActive" class="control-label"></label></th>
@for (int i = 0; i < Model.Count; i++)
<input asp-for="@Model[i].id" type="hidden" />
<input asp-for="@Model[i].FirstName" class="form-control" />
<input asp-for="@Model[i].LastName" class="form-control" />
<input asp-for="@Model[i].Birthday" class="form-control" />
<label class="form-check-label">
<input class="form-check-input" asp-for="@Model[i].IsActive" />
<input type="submit" value="Save" class="btn btn-default" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.