Asp.net core model doesn't bind from form

后端 未结 10 881
没有蜡笔的小新
没有蜡笔的小新 2021-02-02 13:54

I catch post request from 3rd-side static page (generated by Adobe Muse) and handle it with MVC action.

10条回答
  •  孤城傲影
    2021-02-02 14:32

    I'm having the same problem this docs helps me to understand Model Binding https://docs.asp.net/en/latest/mvc/models/model-binding.html

    I solved my problem by making sure that the property name is exact match in form field name and I also add [FromForm] attribute to specify exactly the binding source.

提交回复
热议问题