共用方式為


SiteMapSection.Enabled 屬性

定義

取得或設定一個值,指示 ASP.NET 網站地圖功能是否啟用。

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

屬性值

true如果啟用 ASP.NET 網站地圖功能;否則,。 false 預設值為 true

屬性

範例

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

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

備註

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

適用於