I've got a an object with an Address
object as a property which is used several places in my application. I made a partial view which looks like
@model Address
<div>
<div class="form-group">
<label asp-for="@Model.AddressLine1"></label>
<input asp-for="@Model.AddressLine1" />
</div>
....
I use the form like
<form method="post">
<div class="form-group">
<input asp-for="@Model.Request.Business.Owners[0].FirstName" />
<input asp-for="@Model.Request.Business.Owners[0].LastName" />
</div>
<input type="submit"/>
</form>
the data renders fine on the entire form, including the partial Address view. when I submit the form, everyone I reference the Address partial I get back as null when I submit the form, while the other data is data bound correctly. Is it possible to bind data to a partial view and have it submit with a form post correctly?