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.