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 nullptr or an empty string. - or - originalTypeName is nullptr or an empty string. |
| ArgumentException | originalPath is specified but genericWebPartID is nullptr 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.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.