System.Web.UI.Page.RegisterRequiresViewStateEncryption Method

Registers a control with the page as one requiring view-state encryption.

Syntax

public void RegisterRequiresViewStateEncryption ()

Remarks

If you are developing a custom control that deals with potentially sensitive information, call the Page.RegisterRequiresViewStateEncryption method to register the control with the page and ensure view state for the control is encrypted.

The entire page state will be encrypted if the Page.ViewStateEncryptionMode is set to ViewStateEncryptionMode.Auto or ViewStateEncryptionMode.Always.

Requirements

Namespace: System.Web.UI
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0