  
@page
@model RestAPI2.Pages.EditResident

@{
    ViewData["Title"] = "Edit Resident";
}

<div class="text-center">
<h1>EDIT Resident</h1>
<hr />
<div class="row">
    <div class="col-md-4">
       <form method="post">
            <div asp-validation-summary="ModelOnly" class="text-danger"></div>
            <div class="form-group">
                <label asp-for="Resident.First" class="control-label"></label>
                <input asp-for="Resident.First" class="form-control" />
                <span asp-validation-for="Resident.First" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="Resident.Surname" class="control-label"></label>
                <input asp-for="Resident.Surname" class="form-control" />
                <span asp-validation-for="Resident.Surname" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="Resident.PersonalCode" class="control-label"></label>
                <input asp-for="Resident.PersonalCode" class="form-control" />
                <span asp-validation-for="Resident.PersonalCode" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="Resident.Dateofbirth" class="control-label"></label>
                <input asp-for="Resident.Dateofbirth" class="form-control" />
                <span asp-validation-for="Resident.Dateofbirth" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="Resident.Phone" class="control-label"></label>
                <input asp-for="Resident.Phone" class="form-control" />
                <span asp-validation-for="Resident.Phone" class="text-danger"></span>
            </div>
            <div class="form-group" style="display: none;">
                <input asp-for="Resident.ID" class="form-control" />
            </div>
             <div class="form-group">
                <label asp-for="Resident.Email" class="control-label"></label>
                <input asp-for="Resident.Email" class="form-control" />
                <span asp-validation-for="Resident.Email" class="text-danger"></span>
            </div>
             <div class="form-group">
                <label asp-for="Resident.ApartmentNumber" class="control-label"></label>
                <input asp-for="Resident.ApartmentNumber" class="form-control" />
                <span asp-validation-for="Resident.ApartmentNumber" class="text-danger"></span>
            </div>
        
             <ul  class="list">
                        <li class="nav-item">
                            <div>
                                <a asp-page="/Resident" id="boxlink" class="boxlin2">Cancel</a>
                            </div>
                        </li>
                        <li>
                            <div class="form-group">
                                <input type="submit" value="EDIT"  id="submitBtn" class="boxlin2" />
                            </div>
                        </li>
                    </ul>
            
        </form>
    </div>
</div>
</div>             

@section Scripts {
    @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}