System.Web.UI.Page.RegisterRequiresViewStateEncryption Method

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


public void RegisterRequiresViewStateEncryption ()


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.


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