1
votes

In ASP.NET MVC Beta I was able to get the form parameters of

<input id="addresses[40].City" name="addresses[40].City" type="text" value="City" />
<input id="addresses[40].Country" name="addresses[40].Country" type="text" value="Country" />

as Edit(List<Address> addresses) in controller action.

Nonetheless, in the new Release Candidate I cannot retrieve the values(null) as a parameter in action. I can see the values when I make a FormCollection parameter, but it will be a headache to parse all the Key/Value pairs into a object.

Any help would be appreciated.

1

1 Answers

2
votes

The scheme for list binding changed in the release candidate. Prior to the release candidate, you would have a hidden field which indicated what the index was (40, in your case). In the release candidate, you no longer need this hidden field, but your index must be numeric and must start with 0.