Failed to load resource: the server responded with a status of 500 (Internal Server Error) in Bind function

  • 7,000
  • Tác giả: admin
  • Ngày đăng:
  • Lượt xem: 7
  • Tình trạng: Còn hàng

I'm trying vĩ đại send a điện thoại tư vấn using Ajax but in Chrome it is rising error but in Firefox there is no error. But still it can't calling the method. I tried vĩ đại record my điện thoại tư vấn in Firebug but there is no điện thoại tư vấn request in Firebug. So that's the reason there is no error in Firefox.

Index.chshtml code is below

function onLoad(e) {

    var grid = $(this).data("tGrid");
    //bind vĩ đại the context thực đơn of the Grid's header
    sự kiện.preventDefault();
    $(this).find(".t-grid-header").bind('contextmenu', function (e) {
        //wait for the thực đơn vĩ đại be generated
        setTimeout(function () {
            // bind vĩ đại the checkboxes change sự kiện. The context thực đơn has ID in the format "GridName" + "_contextmenu"
            $('#globalsearchgrid_contextMenu :checkbox').change(function () {
                debugger;
                var $checkbox = $(this);
                // the checked state will determine if the column has been shown or hidden
                var checked = $(this).is(":checked");
                // get the index and the corresponding column from the Grid's column collection
                var columnIndex = $(this).data("field");

                var request = "{'columnIndex':'" + columnIndex + "'value':'" + checked + "'}";
                $.ajax({
                    type: "POST",
                    url: "../../GlobalSearch/SaveColumnInfo",
                    data: request,
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (msg) { },
                    error: function (xhr, status, error) {
                        alert(error.responseTextss);
                    }

                });
            });
        });
    });
}

Controller method

 public JsonResult SaveColumnInfo(string columnIndex, string value)
    {
        CookieHelper helper=new CookieHelper();
        helper.UpdateCookie(int.Parse(columnIndex), value.ToString());

        return Json("Success");
    }

Error in Chrome

POST http‍://localhost:3577/GlobalSearch/SaveColumnInfo 500 (Internal Server Error)
jQuery.ajaxTransport.send
jQuery.extend.ajax
(anonymous function)
jQuery.event.handle
jQuery.event.add.elemData.handle.eventHandle