Documentation for: ASP.NET Ajax Version 1.0

This documentation is for a previous version. For the current released version, see the ASP.NET Ajax documentation on MSDN.

 

 

 

 

 

 

 

RecursionLimit Property

Gets or sets the limit for constraining the number of object levels to process.

Syntax

CSharp

public int RecursionLimit { get; set; }

VisualBasic

Public Property RecursionLimit As Integer

ManagedCPlusPlus

public:
int RecursionLimit {
	int get ();
	void set (int value);
}

JSharp

/** @property */
/** @property */

Value

Return Value

The number of object levels. The default is 100.

Remarks

The RecursionLimit property refers to the number of levels in the object hierarchy that JavaScriptSerializer will process in the following cases:

  • When deserializing a JavaScript Object Notation (JSON) string.

  • When walking an object graph during serialization.

The value of RecursionLimit only applies when you explicitly create an instance of the JavaScriptSerializer class. Use the jsonSerialization element of the configuration file to set the number of object levels to process for the internal serializer instance that is used by the asynchronous communication layer. For more information about the configuration elements, see Configuring ASP.NET AJAX.

Exceptions

ExceptionCondition
ArgumentOutOfRangeException

The property is set to a value that is less than one.

Assembly: System.Web.Extensions (Module: System.Web.Extensions)