Export (0) Print
Expand All
Expand Minimize

ViewStateEncryptionMode Enumeration

Specifies whether view-state information is encrypted.

Namespace: System.Web.UI
Assembly: System.Web (in system.web.dll)

public enum class ViewStateEncryptionMode
public enum ViewStateEncryptionMode
public enum ViewStateEncryptionMode

 Member nameDescription
AlwaysThe view-state information is always encrypted. 
AutoThe view-state information is encrypted if a control requests encryption by calling the RegisterRequiresViewStateEncryption method. This is the default. 
NeverThe view-state information is never encrypted, even if a control requests it. 

The ViewStateEncryptionMode enumeration provides values for specifying whether the view-state information in a Page object is encrypted. The ViewStateEncryptionMode value can be set only in the @ Page directive or in the pages section of the configuration file.

The following code example demonstrates setting the view-state encryption mode for a Page object and requesting encryption of the view-state information through the RegisterRequiresViewStateEncryption method. In this example, the view-state information will be encrypted when customer information is retrieved from a database.

No code example is currently available or this language may not be supported.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft