为什么在发送POST jq请求时,在服务器端得到GET方法?

时间:2019-08-01 06:53:23

标签: jquery asp.net ajax

发送发帖请求时,我想在服务器上发帖。我的问题在哪里?

这不仅发生在jq上,我还尝试使用webclient发出请求。

$('#btnSaveSort').on('click', function () {
        var $sortableList = $("#sortable");
        var listElements = $sortableList.children();
        var jsonValues = "[";
        listElements.each(function (i, element) {
            if ($(element).data("index") != i)
                jsonValues += "{'key':'" + $(element).data("key") + "', 'position':'" + i + "'},";
        });
        jsonValues = jsonValues.slice(0, -1) + "]"; 
$.post("_f_Sorting.aspx", { val: jsonValues, mode: "updated", ip: 133 }, function () {});
 });

This is the value of request type on the server

我希望请求类型是post,但实际类型是get

0 个答案:

没有答案