javascript - Request Entity Too Large Making Ajax call -
here problem, on button click call jquery function should execute code below. executes ok in instances when count value 30996 or around range. added count know maximum data length should be. when length increases 72000 error reads request entity large. trying achieve loop through textboxes in repeater capture value , save information.
i looked through links advice increase maxjasonlength, if default length 102400 data length still less default, why still getting error?
$(".inputfield").each(function () { // if ($(this).val() != "") { csvdata = csvdata + $(this).attr('id') + " = " + $(this).val() + ","; // } }); //check csvdata length var count = csvdata.length; $.ajax({ type: "post", datatype: "json", url: "http://localhost/webmethod", contenttype: "application/json; charset=utf-8", data: json.stringify({ "csvdata": csvdata }), success: function (data) { alert("data saved." + "length :" + count); }, error: function (xhr, textstatus, errorthrown) { alert("error " + errorthrown + "length :" + count); } });
Comments
Post a Comment