WebPartsPersonalization.DefaultProvider Property

 

Gets or sets the name of the default Web Parts personalization provider.

Namespace:   System.Web.Configuration
Assembly:  System.Web (in System.Web.dll)

[ConfigurationPropertyAttribute("defaultProvider", DefaultValue = "AspNetSqlPersonalizationProvider")]
[StringValidatorAttribute(MinLength = 1)]
public string DefaultProvider { get; set; }

Property Value

Type: System.String

The name of the default Web Parts personalization provider.

The Providers property contains the Web Parts personalization providers for the current Web application.

The following code example shows how to use the DefaultProvider property. This code example is part of a larger example provided for the WebPartsSection class.

// Get the current DefaultProvider property value.
Console.WriteLine(
	"Current DefaultProvider value: '{0}'",
	webPartsSection.Personalization.DefaultProvider);

// Set the DefaultProvider property.
webPartsSection.Personalization.DefaultProvider = 
	"ASPNetSQLPersonalizationProvider";

.NET Framework
Available since 2.0
Return to top
Show: