ASP.NET Core 2, jQuery POST data null

后端 未结 3 630
挽巷
挽巷 2021-02-13 15:24

I use jQuery and send data with the POST method. But in the server method the values are not coming. What could be the error?

client

3条回答
  •  佛祖请我去吃肉
    2021-02-13 16:07

    Change your ajax to this

    $.ajax({
    type: "POST",
    contentType: "application/json; charset=utf-8",
    url: "./AddTag?parentId="+42+"&tagName="+'isTagName',
    dataType: "json",
    success: function (response) {
        // ...
    }
    

    });

提交回复
热议问题