WebPartPersonalization.InitialScope Property

Definition

Gets or sets the default personalization scope.

C#
public virtual System.Web.UI.WebControls.WebParts.PersonalizationScope InitialScope { get; set; }

Property Value

The PersonalizationScope indicating the default personalization scope of the associated WebPartManager.

Exceptions

An attempt was made to set this property to a value other than its current value after the associated WebPartManager control's OnInit(EventArgs) method had completed.

An attempt was made to set a value of InitialScope that is not a member of the PersonalizationScope enumeration.

Remarks

This property represents the default personalization scope that should be used for the parent WebPartManager control in the absence of previous knowledge about the proper scope. If this property is not explicitly set, it defaults to returning User scope.

This property can only be set prior to the completion of the WebPartManager control's OnInit method. In practice, this means InitialScope must be set in the page markup on the WebPartManager element. Alternatively, this property can be set during the PreInit phase of the WebPartManager control.

Applies to

Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also