title: MVC3 -- Adding additional items to List<> with Jquery
body: <p>I have a view model that looks like this:</p>
  
  <pre><code>HomeViewModel hvm = new HomeViewModel();
  hvm.Applicant = new Person();
  hvm.Applicant.Residences = new List&lt;Residence&gt;();
  hvm.Applicant.Residences.Add(new Residence() { Type = "Current" });
  </code></pre>
  
  <p>In my .cshtml page, I have:</p>
  
  <pre><code>&lt;label&gt;Street # *:&lt;/label&gt; @Html.TextBoxFor(m =&gt; m.Applicant.Residences[0].StreetNumber)
  </code></pre>
  
  <p>And so on and so forth for my properties in my Residence model.  However, I want the user to be able to add multiple residences(previous, secondary, other, etc).  I can add the necessary form fields via jquery, however, since the model doesn't know about the new list items, I get an error about null objects.  The front end may be adding numerous residences via jquery.</p>