Error:- Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property. Solution:- In this help topic, we will use a custom JsonResult Class for ASP.Net MVC to avoid MaxJsonLength Exceeded Exception. The class is called LargeJsonResult. Below is the implementation of the LargeJSONResult class: using System; using System.Web.Script.Serialization; namespace System.Web.Mvc { public class LargeJsonResult : JsonResult { const string JsonRequest_GetNotAllowed = " This request has been blocked because sensitive information could be disclosed to third party web sites when this is used in a GET request. To allow GET requests, set JsonRequestBehavior to AllowGet." ; public LargeJsonResult() { MaxJsonLength = 1024000; RecursionLimit = 100; } public int MaxJsonLength { get; set; } public int RecursionLimit { get;
Overview Scrolling to a specific element or part of a webpage is mainly done to keep a user intact with the webpage for a longer period. A scroll is a function that can be used also to scroll to the beginning of a webpage from the bottom of the webpage instantly. Instant scrolling functionality is done or implemented using JavaScript. Scrolling to a particular section of a webpage adds a single-click functionality without much intervention from the user. There are different JavaScript scroll to element methods that are used to implement the functionality of scrolling to a particular element. These methods include: JavaScript scrollIntoView method. JavaScript scroll method. JavsScript scrollTo method. In this article, we will understand them thoroughly. Introduction Before learning about the JavaScript scroll to element, Let's learn a bit about JavaScript. JavaScript is an object-oriented programming language used on web pages. JavaScript is the web programming language use