PagesSection.EnableViewState Propiedad

Definición

Obtiene o establece un valor que indica si el estado de vista está habilitado o deshabilitado.

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

Valor de propiedad

Es true si el estado de vista está habilitado; es false si está deshabilitado. De manera predeterminada, es true.

Atributos

Ejemplos

En el ejemplo de código siguiente se muestra cómo utilizar la propiedad EnableViewState.

// 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

Se aplica a

Consulte también