ViewModel’s list is null in action

You’re a smart guy, so look at your view. Then, consider how the HTML gets generated. Then, consider how on postback the Model Binder is supposed to know to re-populate Notes based on the generated HTML.

I think you’ll find that your HTML doesn’t have enough information in it for the Model Binder to figure it out.

Consider this:

@EditorFor(m => Model.Notes)

Rather than the for loop where you are basically hiding the context from the EditorFor function.

Leave a Comment