PagesSection.EnableViewState Property
Definition
Important
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.
Gets or sets a value indicating whether view state is enabled or disabled.
public:
property bool EnableViewState { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("enableViewState", DefaultValue=true)]
public bool EnableViewState { get; set; }
[<System.Configuration.ConfigurationProperty("enableViewState", DefaultValue=true)>]
member this.EnableViewState : bool with get, set
Public Property EnableViewState As Boolean
Property Value
true
if view state is enabled; false
if view state is disabled. The default is true
.
- Attributes
Examples
The following code example shows how to use the EnableViewState property.
// Get the current EnableViewState property value.
Console.WriteLine(
"Current EnableViewState value: '{0}'",
pagesSection.EnableViewState);
// Set the EnableViewState property to false.
pagesSection.EnableViewState = false;
' Get the current EnableViewState property value.
Console.WriteLine( _
"Current EnableViewState value: '{0}'", _
pagesSection.EnableViewState)
' Set the EnableViewState property to false.
pagesSection.EnableViewState = False
Applies to
See also
Spolupráca s nami v službe GitHub
Zdroj tohto obsahu nájdete v službe GitHub, kde môžete vytvárať a skúmať problémy a žiadosti o prijatie zmien. Ďalšie informácie nájdete v našom sprievodcovi prispievateľom.