Aracılığıyla paylaş


ProfileSection.DefaultProvider Özellik

Tanım

Varsayılan profil sağlayıcısının adını alır veya ayarlar.

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

Özellik Değeri

String

Koleksiyondaki bir sağlayıcının Providers adı veya boş bir dize (""). Varsayılan değer "AspNetSqlProfileProvider"dır.

Öznitelikler

Örnekler

Aşağıdaki kod örneği özelliğinin DefaultProvider nasıl kullanılacağını gösterir. Bu kod örneği, sınıfı için ProfileSection sağlanan daha büyük bir örneğin parçasıdır.


// 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"

Açıklamalar

Profil sağlayıcısı, kullanıcı profili değerlerinin depolandığı bir veri kaynağına işaret eder. Profil sağlayıcılarını yapılandırma dosyasının providers bölümünün alt profile bölümünde belirtebilirsiniz.

Şunlara uygulanır

Ayrıca bkz.