WebPartZoneBase.GetInitialWebParts Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets an initial collection of WebPart controls contained in a zone, based on a template or some storage medium.
protected public:
abstract System::Web::UI::WebControls::WebParts::WebPartCollection ^ GetInitialWebParts();
protected internal abstract System.Web.UI.WebControls.WebParts.WebPartCollection GetInitialWebParts ();
abstract member GetInitialWebParts : unit -> System.Web.UI.WebControls.WebParts.WebPartCollection
Protected Friend MustOverride Function GetInitialWebParts () As WebPartCollection
Returns
A WebPartCollection that contains the initial set of WebPart controls that belong in a zone.
Remarks
The GetInitialWebParts method gets the initial collection of WebPart controls for a zone only if there is a preexisting template or other form of storage that determines what controls are in the zone. The method does not reflect any personalization changes, which might mean that controls in the initial collection have actually been moved by a user into another zone.
The initial collection of WebPart controls in the zone are not necessarily the same as the collection contained in the WebParts property of the zone, which reflects the actual current collection of controls in the zone when a page is rendered, taking into account any personalization changes that have been made.
Notes to Implementers
The GetInitialWebParts() method is abstract, so it must be implemented by derived classes. The GetInitialWebParts() method of the WebPartZone class contains one implementation of the method.