PagesSection.EnableViewState プロパティ

定義

ビュー ステートが有効か無効かを示す値を取得または設定します。

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

プロパティ値

true ビューステートが有効な場合。ビューステートが無効になっている場合に false します。 既定値は、true です。

属性

次のコード例は、 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

適用対象

こちらもご覧ください