Page.RegisterRequiresViewStateEncryption Method ()
Registers a control with the page as one requiring view-state encryption.
Assembly: System.Web (in System.Web.dll)
Themethod must be called before or during the page PreRenderphase in the page life cycle.
Legacy Code Example
The following code example demonstrates setting the view-state encryption mode for a Page object and requesting encryption of the view state through . In this example, view state will be encrypted when customer information is retrieved from a database.Code snippet is not found. Confirm that the code snippet name 'System.Web.UI.ViewStateEncryptionMode' is correct.
Available since 2.0