I have used a pattern of compound view models for a few of the forms in this project. It works very well.
In this case I have a VendorAddress view model. I use Add
Try specifying a prefix to help the model binder correctly bind the Address.PostalCode
and Address.State
request values to their corresponding action parameters:
public ActionResult CheckState(
[Bind(Prefix = "Address.State")]string State,
[Bind(Prefix = "Address.PostalCode")]string PostalCode
)
{
...
}