Επεξεργασία

Κοινή χρήση μέσω


ProxyWebPart Constructors

Definition

Initializes a new instance of the ProxyWebPart class.

Overloads

ProxyWebPart(WebPart)

Initializes a new instance of the ProxyWebPart class when a static Web Parts control (or server or user control) must be replaced.

ProxyWebPart(String, String, String, String)

Initializes a new instance of the ProxyWebPart class when a dynamic Web Parts control must be replaced.

ProxyWebPart(WebPart)

Initializes a new instance of the ProxyWebPart class when a static Web Parts control (or server or user control) must be replaced.

protected:
 ProxyWebPart(System::Web::UI::WebControls::WebParts::WebPart ^ webPart);
protected ProxyWebPart (System.Web.UI.WebControls.WebParts.WebPart webPart);
new System.Web.UI.WebControls.WebParts.ProxyWebPart : System.Web.UI.WebControls.WebParts.WebPart -> System.Web.UI.WebControls.WebParts.ProxyWebPart
Protected Sub New (webPart As WebPart)

Parameters

webPart
WebPart

The Web Parts control to be replaced.

Exceptions

webPart is null.

webPart has an empty ID property

-or-

webPart is an empty GenericWebPart

-or-

webPart is of type GenericWebPart and its child control has an empty ID property.

Remarks

This constructor is used to create a proxy Web Parts control to replace a static Web Parts control. To replace a dynamically created Web Parts control, use the ProxyWebPart(String, String, String, String) constructor to create the proxy Web Parts control.

Applies to

ProxyWebPart(String, String, String, String)

Initializes a new instance of the ProxyWebPart class when a dynamic Web Parts control must be replaced.

protected:
 ProxyWebPart(System::String ^ originalID, System::String ^ originalTypeName, System::String ^ originalPath, System::String ^ genericWebPartID);
protected ProxyWebPart (string originalID, string originalTypeName, string originalPath, string genericWebPartID);
new System.Web.UI.WebControls.WebParts.ProxyWebPart : string * string * string * string -> System.Web.UI.WebControls.WebParts.ProxyWebPart
Protected Sub New (originalID As String, originalTypeName As String, originalPath As String, genericWebPartID As String)

Parameters

originalID
String

A string that is the control ID (not the unique ID) of the control to replace. If a GenericWebPart control is replaced, the ID is the ID of its child server control.

originalTypeName
String

A string that is the name of the Type of the control to replace. If a GenericWebPart control is replaced, the type name is the type of its child server control.

originalPath
String

A string that contains the path to the user control to replace.

genericWebPartID
String

A string that returns the ID of a GenericWebPart control, if that type of control is being replaced. This is needed for controls that do not inherit from the WebPart base class.

Exceptions

originalID is null or an empty string.

-or-

originalTypeName is null or an empty string.

-or-

originalPath is specified but genericWebPartID is null or an empty string.

Remarks

This constructor is used to create a proxy Web Parts control to replace a dynamic Web Parts control. To replace a static Web Parts control, use the ProxyWebPart(WebPart) constructor to create a proxy Web Parts control.

Applies to