ASP.NET MVC3 bind to subclass

前端 未结 1 426
盖世英雄少女心
盖世英雄少女心 2021-02-15 13:03

I have a superclass of type Question which has multiple subclasses (e.g. MultipleChoiceQuestion and TextQuestion). Each of the subclasses have their

相关标签:
1条回答
  • 2021-02-15 13:32

    I think you're running up against a limitation of the DefaultModelBinder. To solve this problem, you need to use a customer model binder.

    You might find this post a useful guide; it talks about this specific problem.

    0 讨论(0)
提交回复
热议问题