PagesSection.ViewStateEncryptionMode Property


Gets or sets the encryption mode that ASP.NET uses when maintaining ViewState values.

Namespace:   System.Web.Configuration
Assembly:  System.Web (in System.Web.dll)

<ConfigurationPropertyAttribute("viewStateEncryptionMode", DefaultValue := ViewStateEncryptionMode.Auto)>
Public Property ViewStateEncryptionMode As ViewStateEncryptionMode

Property Value

Type: System.Web.UI.ViewStateEncryptionMode

A ViewStateEncryptionMode enumeration value indicating when the ViewState values are encrypted.

The possible ViewStateEncryptionMode enumeration values are Always, Auto, and Never. The default value is Auto. If ViewStateEncryptionMode property is set to Auto, ViewState will be encrypted when a control requests it.

.NET Framework
Available since 2.0
Return to top