MVC 2 UpdateModel on Interface, Should ModelBinderAttribute be ignored?

后端 未结 1 1909
清歌不尽
清歌不尽 2021-01-07 09:10

I have forms posting data from instances of a particular abstract class:

public abstract class IRestriction
{
    public string Name {get; set;}
    public a         


        
相关标签:
1条回答
  • 2021-01-07 09:43

    I think it's a bug, but the ASP.NET MVC team disagrees. Model binding looks at the static, compile-time type of the model. I don't like it, but that's how it is.

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