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

注解

此设置会影响当前节点级别及更低级别的应用程序域或域。

适用于

另请参阅