Hello i need to send some data back to the server and i want to use the following code.
Does someone know if there is a limit on the dimension of the string sent with the following code
This is my js code:
$(document).ready(function() {
$.ajax({
type: "POST",
url: "test.aspx/PassBackdata",
contentType: "application/json; charset=utf-8",
data: "{'args': '" + Ldata + "'}",
dataType: "json",
success: AjaxSucceeded,
error: AjaxFailed
});
});
};
Since you are using POST the data you are sending to the server could be arbitrarily large and is controlled by the
<httRuntime>element in your web.config:and if you host in IIS7+ you should also use the
<requestLimits>tag:Also I would recommend you using the
JSON.stringifymethod to ensure that the data is properly encoded: