Getting the values of action parameters within an action filter

前端 未结 2 1591
渐次进展
渐次进展 2020-12-28 14:54

I have an action that I am POSTing to from jquery:

[HttpPost]
public void UpdateGroupName(int groupId, string name)
{
         


        
2条回答
  •  甜味超标
    2020-12-28 15:40

    Try without the stringify. I guess MVC is understanding another way of binding besides the request parameter -> action parameter. I guess it's understanding the json posted. JQuery, if you pass just the data object (without stringify) will post each field as a request parameter (at least, I think so). It's easy to try :)

提交回复
热议问题