这是我的带有 json 的 jquery
 $('#btnVerificationOk').click(function () {
                var verId = $('#trans_verification_id').val();
                var verCode = $('#trans_verification_code').val();
                $.ajax({
                    url: '/Profile/CompleteTransactions',
                    type: 'POST',
                    data: {  },
                    dataType: 'json',
                    success: function (result) {
                        alert(result);
                    },
                    error: function () {
                        alert('ERROR ERROR !!!!!!!!!!!!');
                    }
                });
            });
还有我的 C# 方法:
 [Authorize]
        [HttpPost]
        private JsonResult CompleteTransactions()
        {
            return Json("Done");
        }
它总是提醒'错误错误!!!!!!!!!!!!' 我尝试调试,但 CompleteTransactions 方法没有触发
这是我的第二个 json,它在下面并且效果很好
$('#btnTransfareOk').click(function () {
                var userName = $('#transfare_username').val();
                var amount = $('#transfare_amount').val();
                if (userName == '' || amount == '') {
                    $('#transfare_error_list').html('Please fill boxes.');
                } else {
                    $.ajax({
                        url: '/Profile/TranfareMoney',
                        type: 'POST',
                        data: { ToUsername: userName, Amount: amount },
                        dataType: 'json',
                        success: function (result) {
                            $('#transfare_error_list').html(result.text);
                            $('#trans_verification_id').val(result.id);
                            $('#transfare_username').val("");
                            $('#transfare_amount').val("");
                        },
                        error: function () {
                            $('#transfare_error_list').html('Oops... Error.');
                        }
                    });
                }
            });