共用方式為


RoleManagerSection.Enabled 屬性

定義

取得或設定一個值,指示 ASP.NET 角色管理功能是否啟用。

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

屬性值

true若啟用 ASP.NET 角色管理功能;否則,。 false 預設值為 false

屬性

範例

以下程式碼範例示範如何使用該 Enabled 屬性。 此程式碼範例是本類別更大範例 RoleManagerSection 的一部分。

// Display Enabled property.
Console.WriteLine("Enabled: {0}", configSection.Enabled);
' Display Enabled property.
Console.WriteLine("Enabled: {0}", configSection.Enabled)

備註

Enabled 屬性會回傳一個布林值,指示執行時是否能存取 ASP.NET 角色管理功能。

適用於