title: ASP.NET MVC - handling multiple objects in one form
body: <p>I have a scenario I'm stuck on - I have a domain object that has a collection of objects attached to it.  Something like this:</p>
  
  <pre><code>public class Person
  {
     public string Name { get; set; }
     public IList&lt;PhoneNumber&gt; PhoneNumbers {get; set; }
     public IList&lt;Address&gt; Addresses { get; set; }
  }
  </code></pre>
  
  <p>The UI the client wants has a single input form for adding and editing.  A user could enter 0 to many phones/addresses for each person.  How do I handle posting the collection of values back to the controller? </p>
  
  <p>I can think of a couple of approaches, but they all seem brute-force and not very elegant.  Is there a best practice for handling this sort of problem? </p>