SiteMapSection.Providers 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得 ProviderSettingsCollection 物件的 ProviderSettings 集合。
public:
property System::Configuration::ProviderSettingsCollection ^ Providers { System::Configuration::ProviderSettingsCollection ^ get(); };
[System.Configuration.ConfigurationProperty("providers")]
public System.Configuration.ProviderSettingsCollection Providers { get; }
[<System.Configuration.ConfigurationProperty("providers")>]
member this.Providers : System.Configuration.ProviderSettingsCollection
Public ReadOnly Property Providers As ProviderSettingsCollection
屬性值
ProviderSettingsCollection A 包含設定檔該區段子節providers中定義siteMap的提供者設定。
- 屬性
範例
以下程式碼範例示範如何使用該 Providers 屬性。 此程式碼範例是本類別更大範例 SiteMapSection 的一部分。
// Display elements of the Providers collection property.
foreach (ProviderSettings providerItem in configSection.Providers)
{
Console.WriteLine();
Console.WriteLine("Provider Details:");
Console.WriteLine("Name: {0}", providerItem.Name);
Console.WriteLine("Type: {0}", providerItem.Type);
}
' Display elements of the Providers collection property.
For Each providerItem As ProviderSettings In configSection.Providers()
Console.WriteLine()
Console.WriteLine("Provider Details -")
Console.WriteLine("Name: {0}", providerItem.Name)
Console.WriteLine("Type: {0}", providerItem.Type)
Next
備註
網站地圖提供者是提供存取網站導航結構的元件。 您可以在設定檔的子節providers中指定網站地圖提供者siteMap。
屬性預設 DefaultProvider 會標示使用哪個提供者。