PersonalizationAdministration.Provider Property

Definition

Returns an instance of the default personalization provider.

public:
 static property System::Web::UI::WebControls::WebParts::PersonalizationProvider ^ Provider { System::Web::UI::WebControls::WebParts::PersonalizationProvider ^ get(); };
public static System.Web.UI.WebControls.WebParts.PersonalizationProvider Provider { get; }
static member Provider : System.Web.UI.WebControls.WebParts.PersonalizationProvider
Public Shared ReadOnly Property Provider As PersonalizationProvider

Property Value

A PersonalizationProvider of the default provider.

Exceptions

The provider for a personalization provider defined in configuration is not of the correct type.

A configuration exception occurred while attempting to create and initialize an instance of one of the configured personalization providers.

-or-

The default personalization provider defined in configuration could not be found.

Examples

The following code example demonstrates how to use the Provider property.

_provider = PersonalizationAdministration.Provider.Name;
TextBox1.Text = _provider;

Remarks

Use this property to retrieve an instance of the default personalization provider. This is the provider specified in the personalization provider section of the Web.config or Machine.config file.

Applies to

See also