State Mode Enum
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specifies whether view state will be enabled for a control.
public enum class ViewStateMode
public enum ViewStateMode
type ViewStateMode =
Public Enum ViewStateMode
Disable view state for this control even if the parent control has view state enabled.
Enable view state for this control even if the parent control has view state disabled.
Inherit the value of ViewStateMode from the parent Control.
You can use the Control.ViewStateMode property to enable view state for an individual control even if it is disabled for the page.
To turn off view state for a page and turn it on for a specific control on the page, set the EnableViewState property of the page and the control to
true, set the ViewStateMode property of the page to Disabled, and set the ViewStateMode property of the control to Enabled.
The ViewStateMode property of a page or a control has an effect only if the EnableViewState property is set to
true. If the EnableViewState property is set to
false, view state will be turned off even if the ViewStateMode property is set to Enabled.