ProxyWebPart Constructor (String^, String^, String^, String^)
Initializes a new instance of the ProxyWebPart class when a dynamic Web Parts control must be replaced.
Assembly: System.Web (in System.Web.dll)
protected:
ProxyWebPart(
String^ originalID,
String^ originalTypeName,
String^ originalPath,
String^ genericWebPartID
)
Parameters
- originalID
-
Type:
System::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
-
Type:
System::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
-
Type:
System::String^
A string that contains the path to the user control to replace.
- genericWebPartID
-
Type:
System::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.
| Exception | Condition |
|---|---|
| ArgumentException | originalID is null or an empty string. - or - originalTypeName is null or an empty string. |
| ArgumentException | originalPath is specified but genericWebPartID is null or an empty string. |
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.
Available since 2.0