I'm still trying to figure out how to create reusable partial views in MVC
Suppose I would like to create a partial view to display a form for submitting an address. Then in my ViewModel, I have two addresses (home address and work address), so I would think that, in my opinion, I call HTML.Partial for each such type
@Html.Partial("Address", Model.HomeAddress)
@Html.Partial("Address", Model.WorkAddress)
but what happens, instead of fields with names such as HomeAddress.Street, HomeAddress.City, etc., they just have the usual field names Street, City, etc., so the middleware in the HTTPPost action has no idea. what to do with their
Thanks in advance
source
share