Редагувати

Поділитися через


CatalogPart.GetWebPart(WebPartDescription) Method

Definition

Retrieves from a catalog the WebPart control that is referenced by the WebPartDescription object passed to the method.

public:
 abstract System::Web::UI::WebControls::WebParts::WebPart ^ GetWebPart(System::Web::UI::WebControls::WebParts::WebPartDescription ^ description);
public abstract System.Web.UI.WebControls.WebParts.WebPart GetWebPart (System.Web.UI.WebControls.WebParts.WebPartDescription description);
abstract member GetWebPart : System.Web.UI.WebControls.WebParts.WebPartDescription -> System.Web.UI.WebControls.WebParts.WebPart
Public MustOverride Function GetWebPart (description As WebPartDescription) As WebPart

Parameters

description
WebPartDescription

A WebPartDescription that contains a reference to a specific WebPart.

Returns

A WebPart that is referenced by the object in the description parameter.

Remarks

The GetWebPart method returns a WebPart control from a catalog. The WebPartDescription object that is passed to the method matches a specific WebPart control and enables that control to be returned by the method.

If a catalog contains a server control that does not derive from the WebPart class, such as an ASP.NET server control, a custom server control, or a user control, a CatalogPart control must wrap the server control with a GenericWebPart control, and return the GenericWebPart control from this method.

Notes to Implementers

The GetWebPart(WebPartDescription) method is abstract, so it must be implemented by derived CatalogPart controls. This method is called by the zone that contains a CatalogPart control, by an associated CatalogPartChrome object, and by the WebPartManager object on a Web page.

Applies to

See also