ASP Net MVC - Send different model on POST
<p>is it possible to send an object from a strongly typed view to the Controller via Http-POST that does not equal the type of the original model.</p>

<p>For example:</p>

<p>I have a ViewModel like this:</p>

<pre><code>public class PersonsViewModel
{
    List&lt;PersonViewModel&gt; persons { get; set; }

    PersonsViewModel() { }
}

public class PersonViewModel
{
    //some properties

    Person() { }
}
</code></pre>

<p>Now i have this View:</p>

<pre><code>@model PersonsViewModel

&lt;div&gt;
  @for(int i = 0; i &gt; Model.persons.Count; i++)
{
    @Html.EditorFor(Model.persons[i])
}
&lt;/div&gt;
</code></pre>

<p>The editor could look like this:</p>

<pre><code>@model PersonViewModel

&lt;div&gt;
     @using (Html.Beginform("Postaction","Controller", FormMethod.Post)){
     &lt;div&gt;
       &lt;!-- properties and textboxes here + submit button --&gt;
     &lt;/div&gt;
}
&lt;div&gt;
</code></pre>

<p>The controller action</p>

<pre><code>[ValidateAntiForgeryToken]
        [HttpPost]
        public ActionResult Postaction(PersonViewModel model)
        {
            //do something
        }
    }
</code></pre>

<p>This doesn't work because it seems the Controller is expecting a PersonsViewModel object. My workaround so far is to make a "big" Form that contains all PersonViewModel and send the complete PersonsViewModel to the controller. </p>

<p>Is it somehow possible to pass only one PersonViewModel to the Controller although the view is strongly typed?</p>

<p>Kind regards,
Martin</p>