MVC3 Passing ViewModel to controller method using JQuery Ajax

后端 未结 3 1709
臣服心动
臣服心动 2021-01-05 15:06

I\'m trying to pass a form\'s data to my controller method using JQuery Ajax, but I\'m not sure how you do this as my ViewModel is null when I use debugger on the Controller

3条回答
  •  情歌与酒
    2021-01-05 15:18

    The names of the variables in the data that you are posting does not correspond with the names of the properties of your ASP.Net MVC ViewModel, so the data can not be binded properly.

提交回复
热议问题