title: Bind model during post of form inside EditorTemplate (on array)/multiple bind prefixes?
body: <p>I have a complex Model containing an array. For rendering items for this array I'm using EditorFor like this:</p>
  
  <pre><code>for (int i = 0; i &lt; Model.Contacts.Phones.Length; i++)
  {       
      @Html.EditorFor(x =&gt; x.Contacts.Phones[i])
  }
  </code></pre>
  
  <p>Inside editor there is a post-form. Problem is, that binding is successful only when I exactly specify binding prefix:</p>
  
  <pre><code>[HttpPost]
  public ActionResult SavePhone(
      [Bind(Prefix = "Contacts.Phones[0]")]Contact5UsedPhone model)
  { ... }
  </code></pre>
  
  <p>So it works only for first of the elements. What is the correct form of prefix? </p>
  
  <p>For the more there is also on the same page editor for different property - but same type of model and same action is therefore executed. Is it possible to set more than one binding prefix? E.g.</p>
  
  <pre><code>[HttpPost]
  public ActionResult SavePhone(
      [Bind(Prefix = "Contacts.Phones[0], Contacts.AnotherPrefix")]
      Contact5UsedPhone model)
  { ... }
  </code></pre>
  
  <p>Thank you!</p>
  
  <p>edit - model:</p>
  
  <pre><code>public class ContactsViewModel
  {
      public Contact5UsedPhone AddiblePhone {get;set;}
      public Contact5UsedPhone[] Phones {get;set;}
      ...
  }
  </code></pre>
  
  <p>edit - answer: 
  I found a solution for this. As there is one array (Phones) and one single entity (AddiblePhone), I used two parameters and simple if:</p>
  
  <pre><code>[HttpPost]
  public ActionResult SavePhone(
      [Bind(Prefix = "Contacts.Phones")]Contact5UsedPhone[] models, 
      [Bind(Prefix = "Contacts.AddiblePhone")]Contact5UsedPhone model)
  {
      model = model ?? models[0];
      ...
  }
  </code></pre>
  
  <p>The question still remains - what if there were AddiblePhones as array? Is it possible to use two prefixes for one parameter, or does it have to be divided to two parameters as I did in this case?</p>