Last active
October 4, 2019 06:11
-
-
Save jorgelevy/acf235ebe69dee8d8c87b76c936ce6d7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@model List<ModelListBinding.Models.Person> | |
<form asp-action="Save" method="post" role="form"> | |
<table> | |
<thead> | |
<tr> | |
<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> | |
</tr> | |
</thead> | |
@for (int i = 0; i < Model.Count; i++) | |
{ | |
<tr> | |
<td> | |
<input asp-for="@Model[i].id" type="hidden" /> | |
<input asp-for="@Model[i].FirstName" class="form-control" /> | |
</td> | |
<td> | |
<input asp-for="@Model[i].LastName" class="form-control" /> | |
</td> | |
<td> | |
<input asp-for="@Model[i].Birthday" class="form-control" /> | |
</td> | |
<td> | |
<label class="form-check-label"> | |
<input class="form-check-input" asp-for="@Model[i].IsActive" /> | |
</label> | |
</td> | |
</tr> | |
} | |
</table> | |
<input type="submit" value="Save" class="btn btn-default" /> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment