This documentation is archived and is not being maintained.

WebPartPersonalization::InitialScope Property

Gets or sets the default personalization scope.

Namespace:  System.Web.UI.WebControls.WebParts
Assembly:  System.Web (in System.Web.dll)

public:
virtual property PersonalizationScope InitialScope {
	PersonalizationScope get ();
	void set (PersonalizationScope value);
}

Property Value

Type: System.Web.UI.WebControls.WebParts::PersonalizationScope
The PersonalizationScope indicating the default personalization scope of the associated WebPartManager.

ExceptionCondition
InvalidOperationException

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

ArgumentOutOfRangeException

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

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.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: