I have a client dto that contains a bunch of fields and also contains a list.
Now I can become attached to him quite easily, and he will display the Client with all his addresses. The fact is that the user can delete and add addresses dynamically.
I thought about adding forms associated with each address, but then I end up with internal forms, and I know that browsers do not play so well.
Then I thought about using javascript, but if the address is deleted, I have to go through all the addresses and change their indexes (addresses [0] .City), because I noticed that if the indexes are out of order and the action takes ClientForm as a parameter, then only in the list, which have sequential indexes, and they begin with 0 -, are in the ClientForm.Addresses list.
Any other solutions that are easy to implement? Did I miss something?
source
share