I have a Model object with a list of Sub objects. I need to upload form fields for an auxiliary object to the page and provide a link to dynamically add form fields for the second object. Thus, in other words, several auxiliary objects can be created using one form and one record.
My first thought was only to put the form fields in a partial view and load the view through Ajax.ActionLink. This worked, but the problem occurs when trying to uniquely identify each object in the collection and bind the collection of objects to the postback. To do this, it seems correct to use the @ Html.EditorFor () helper, but I do not know how to call it via Ajax to dynamically add an object editor template to the page when the link is clicked.
source
share