共用方式為


HttpRuntimeSection.Enable 屬性

定義

取得或設定一個值,指示應用程式域是否啟用。

public:
 property bool Enable { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("enable", DefaultValue=true)]
public bool Enable { get; set; }
[<System.Configuration.ConfigurationProperty("enable", DefaultValue=true)>]
member this.Enable : bool with get, set
Public Property Enable As Boolean

屬性值

true若應用程式域已啟用;否則,。 false 預設值為 true

屬性

範例

以下範例說明如何使用該 Enable 屬性。

// Get the Enable property value.
Response.Write("Enable: " +
  configSection.Enable + "<br>");

// Set the Enable property value to true.
configSection.Enable = true;
' Get the Enable property value.
Response.Write("Enable: " & _
  configSection.Enable & "<br>")

' Set the Enable property value to true.
configSection.Enable = True

備註

此設定影響當前節點層級及以下的應用域。

適用於

另請參閱