Here is my problem, on Button Click I call a Jquery function which should execute the code below. Now this executes ok in some instances when the count value is 30996 or around this range. I added the count just to know what the maximum data length should be. However when length increases to 72000 I get an error which reads Request Entity Too Large. What am trying to achieve is to loop through textboxes in a repeater capture their value and save the information.
I looked through some links which advice to increase maxJasonLength, but if the default length is 102400 my data length is still less than the default, why am I still getting this 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 was saved." + "length is :" + count);
},
error: function (xhr, textStatus, errorThrown) {
alert("ERROR " + errorThrown + "length is :" + count);
}
});