I am using following code in .cshtml file.
var typeVM = JSON.parse('@Html.Raw(Json.Encode(Model.typeVM))');
Shows following Error:
Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.
I dnt get any way to define max length for Json Encode
function and Web.config configuration is only working for web-services.
So question is what is possible solution for this problem?
How do I define jsonMaxLength
property?