GenericWebPart.CreateControlCollection 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.
Overrides the base method to create a read-only collection that consists of the child control wrapped by a GenericWebPart control.
protected:
override System::Web::UI::ControlCollection ^ CreateControlCollection();
protected override System.Web.UI.ControlCollection CreateControlCollection ();
override this.CreateControlCollection : unit -> System.Web.UI.ControlCollection
Protected Overrides Function CreateControlCollection () As ControlCollection
Returns
A ControlCollection that contains the child control.
Remarks
The CreateControlCollection method creates a private, read-only collection that consists of a single control, which is the child control of a GenericWebPart control. This collection is created so that developers cannot manually add other controls to a GenericWebPart control.
If you want to create a custom GenericWebPart control without adding the child control to the private collection, you can derive from the GenericWebPart class, override the GenericWebPart constructor, and provide a different method for storing the child control referenced by the ChildControl property.
Applies to
See also
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈