I have to send unlimited JSON data from ajax J query to MVC razor controller.
 The method is triggered once we send limited data. if i send more data the method is not triggered and Am getting 500 Internal error.
        $.ajax({
                             url: '../Offline/Save',
                             data: JSON.stringify(Item),
                             data: "{'Id':" + Results.rows.item(m).Id + ",'Item':" + JSON.stringify(Item) + "}",
                             type: 'POST',
                             dataType: "json",
                             contentType: "application/json; charset=utf-8",
                             success: function (data, status) {
                                 alert(data);
                                 }
                             },                                
                             error: function (xhr, ajaxOptions, thrownError) {
                                 console.log(xhr.status);
                                 console.log(thrownError);
                             }
                         });
 
 
     [HttpPost]
     [ValidateInput(false)]
     public JsonResult SaveFinding(int Id, SyncItem Item)
     {
         Result result = new DB().Process(Id, Item);
         return Json(result);
     }
 
No comments:
Post a Comment