jQuery post to asp.net page error : The length of the query string for this request exceeds the configured maxQueryStringLength value
I am trying to do a jQuery post the cont开发者_如何学运维ent of a text editor to an asp.net page (asp.net 4.0) from my javascript.The asp.net page will receive it and save it to db.I append the text editor's content in the querystring.When the content is big, I am getting the following exception
The length of the query string for this request exceeds the configured maxQueryStringLength value.
It works fine for small content.But when the content is big,It throws an error
Here is my javascript code
var content1 = $("#txtAdminLabelEdit"+id).val();
content = encodeURIComponent(content1);
var url = "handlers/adminhandler.aspx?mode=savecontent&page=home&lid=1&vid=2<xt=" + content;
$.post(url, function (data) {
if (data == "yes") {
//do something
}
});
is this ASP.net 4.0? if then you can set the maxQueryStringLength
like this.
<httpRuntime maxRequestPathLength="360" maxQueryStringLength="1024" />
精彩评论