Coffeehouse Post

Single Post Permalink

View Thread: Advanced MVC 3 with Brad Wilson - non class models
  • User profile image

    @SallyMeander:I think it could be a missing model binder to convert an array.

    Btw, my company's MVC web application needs to add 2 custom derivatives of DefaultModelBinder to make it work for us (because it won't handle number with thousand seperator). Maybe you should write your own ModelBinder too to work around this.

    The key would be to add the following check:

    if (bindingContext.ValueProvider.GetValue(bindingContext.ModelName).RawValue is Array)

    I'll leave it to you to figure out the remaing code to be written.