Uredi

Deli z drugimi prek


Page.MaxPageStateFieldLength Property

Definition

Gets or sets the maximum length for the page's state field.

public:
 property int MaxPageStateFieldLength { int get(); void set(int value); };
[System.ComponentModel.Browsable(false)]
public int MaxPageStateFieldLength { get; set; }
[<System.ComponentModel.Browsable(false)>]
member this.MaxPageStateFieldLength : int with get, set
Public Property MaxPageStateFieldLength As Integer

Property Value

The maximum length, in bytes, for the page's state field. The default is -1.

Attributes

Exceptions

The MaxPageStateFieldLength property is not equal to -1 or a positive number.

The MaxPageStateFieldLength property was set after the page was initialized.

Remarks

When the MaxPageStateFieldLength property is set to a positive number, the view state sent to the client browser is broken into multiple hidden fields, and each field's value is less than the size specified in the MaxPageStateFieldLength property.

Setting the MaxPageStateFieldLength property to a negative number (the default) indicates that the view-state field should not be separated into chunks. Setting the MaxPageStateFieldLength to a small number may result in poor performance.

Set the value of the MaxPageStateFieldLength property in the pages element of the Web.config file.

Applies to