I know that you can bind to a viewModel's collection on the client side like so:
<%for(int i = 0; i < Model.contacts.Count; i ++){%>
First Name: <%: Html.TextBoxFor(model => model.contacts[i].firstName) %>
Last Name: <%: Html.TextBoxFor(model => model.contacts[i].lastName) %>
<%}%>
... this will allow the user to change the name info associated with this collection and when the form is posted to the receiving action the viewModel will have the respective changes.
Given that I can edit a viewModel's collection from the client, is there a way I can add to a viewModel's collection from the client as well. For example add a new contact into the viewModel's contacts List. I want to put a simple "Add contact" button in my page that will allow the user to add a contact to this list with out going back and forth to the server. Am i trying to do something impossible. I hope this makes sense.
Thanks.