ProfileSection.DefaultProvider Własność
Definicja
Ważny
Niektóre informacje dotyczą produktów przedpremierowych, które mogą zostać znacznie zmodyfikowane przed premierą. Microsoft nie udziela żadnych gwarancji, ani wyraźnych, ani domniemanych, dotyczących informacji podanych tutaj.
Pobiera lub ustawia nazwę domyślnego dostawcy profilu.
public:
property System::String ^ DefaultProvider { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("defaultProvider", DefaultValue="AspNetSqlProfileProvider")]
[System.Configuration.StringValidator(MinLength=1)]
public string DefaultProvider { get; set; }
[<System.Configuration.ConfigurationProperty("defaultProvider", DefaultValue="AspNetSqlProfileProvider")>]
[<System.Configuration.StringValidator(MinLength=1)>]
member this.DefaultProvider : string with get, set
Public Property DefaultProvider As String
Wartość nieruchomości
Nazwa dostawcy w kolekcji Providers lub pusty ciąg (""). Wartość domyślna to "AspNetSqlProfileProvider".
- Atrybuty
Przykłady
W poniższym przykładzie kodu pokazano, jak używać DefaultProvider właściwości. Ten przykład kodu jest częścią większego przykładu podanego ProfileSection dla klasy.
// Get the current DefaultProvider property value.
Console.WriteLine(
"Current DefaultProvider value: '{0}'", profileSection.DefaultProvider);
// Set the DefaultProvider property to "AspNetSqlProvider".
profileSection.DefaultProvider = "AspNetSqlProvider";
' Get the current DefaultProvider property value.
Console.WriteLine( _
"Current DefaultProvider value: '{0}'", profileSection.DefaultProvider)
' Set the DefaultProvider property to "AspNetSqlProvider".
profileSection.DefaultProvider = "AspNetSqlProvider"
Uwagi
Dostawca profilu wskazuje źródło danych, w którym są przechowywane wartości profilu użytkownika. Dostawcy profilów można określić w providers podsekcji profile sekcji pliku konfiguracji.