Capturing a list of data entries before submitting
<p>I have a model like this :</p>

<pre><code>public class Person
{
    public string Name {get;set;}
    public List&lt;Pet&gt; Pets {get;set;}
}

public class Pet
{
    public string Type {get;set;}
    public string Name {get;set;}
}
</code></pre>

<p>I want a user to capture all this information on a web page before submitting it to the server to save. I came up with a solution to build a table row for each pet that is captured by the user. So my javascript is adding rows to a table for each pet that is captured. When the user clicks on the Save button I build a javascript object:</p>

<pre><code>person.name
person.pets[]
</code></pre>

<p>Then I submit this to the server.</p>

<p>The question is, is this the way to go or is there a better way, should I not rather add  input elements for each pet, and submit a form?</p>
