ASP.NET MVC3 bind to subclass

前端 未结 1 1263
自闭症患者
自闭症患者 2021-02-15 13:00

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:36

    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)
提交回复
热议问题