tags:

views:

119

answers:

1

I have a view which contains multiple partial views, each of which is collecting information to populate different entity objects. My question is, upon the POST, how do I get a collection of objects that are populated with the right properties as a parameter to the Controller POST handler method?

so I would like something like this:

[AcceptVerbs(HttpVerbs.Post)] public ActionResult Edit(List objectCollection) {

}

+2  A: 

You got various options. Common one is to use default model binder. You just need to follow some naming (of html input elements) rules.

Advanced options are to use ActionFilters and custom model binders.

I recommend you to read this and this article.

Arnis L.