ASP.NET MVC - Custom model binder able to process arrays
问题 I need to implement a functionality to allow users to enter price in any form, i.e. to allow 10 USD, 10$, $10,... as input. I would like to solve this by implementing a custom model binder for Price class. class Price { decimal Value; int ID; } The form contains an array or Prices as keys keys: "Prices[0].Value" "Prices[0].ID" "Prices[1].Value" "Prices[1].ID" ... The ViewModel contains a Prices property: public List<Price> Prices { get; set; } The default model binder works nicely as long as