Export (0) Print
Expand All

WebPartDescription Constructor (WebPart)

Initializes a new instance of the class when a WebPart control instance is available.

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

public WebPartDescription(
	WebPart part
)

Parameters

part
Type: System.Web.UI.WebControls.WebParts.WebPart

A WebPart control whose information is contained in a WebPartDescription.

ExceptionCondition
ArgumentException

The ID property of part is null or an empty string ("").

The WebPartDescription constructor is used for creating a new WebPartDescription object based on an existing WebPart control. This constructor simply calls the other overload, the WebPartDescription(String, String, String, String) constructor, obtaining the required parameter values from properties on the part parameter.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0
Show:
© 2015 Microsoft