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.

Exception Condition
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
Available since 2.0
Return to top
Show: