This blog post of mine can help you lots:
Asp.net MVC model binding to List<T>
But basically you will provide fields for your IncomeDeclaration
and then dynamically add ActivityIncomeDeclaration
fields as needed.
If you want to actually serialize the form you will have to follow instruction provided in the upper blog post.
But there's the second choice as well if you use jQuery. You could manipulate a complex JavaScript object that would be a copy of the same server side C# class like:
var incDec = { Name: "" // and other properties ActivityIncomeDeclarations: [] };
Then while user would be adding those ActivityIncomeDeclarations you'd always simply call
incDec.ActivityIncomeDeclarations.push({ // properties });
Then my other blog post will help you that can convert this object to a Dictionary that jQuery for instance is easily able to process:
Sending complex JSON objects to Asp.net MVC using jQuery
By using the prlogin the blog post you could then just easily do:
$.ajax({ url: "someURL", type: "POST", data: $.toDictionary(incDec), success: function(data, status, xhr){ // process success }, error: function(xhr, status, err){ // process error } });