I have a model
public class DeModel
{
public string id{get;set;}
public string Name{get;set;}
public List<AdressesModel>{get;set;}
}
public class AdressesModel
{
public string id{get;set;}
public string line1{get;set;}
public string line2{get;set;}
public string hometown{get;set;}
public string city{get;set;}
public string country{get;set;}
}
In my view, user should be able to add or delete addresses and I should be able to get the final list on the post back.
Js is one way , but it is too complicated , I have to keep track of the indexes and I need to change alot when the model changes.
I see that editorfortemplates with ajax call is an option but couldn't figure out how to do that .
How can I do this other than JS ?