This documentation is archived and is not being maintained.

ProxyWebPart Constructor (String, String, String, String)

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

Namespace:  System.Web.UI.WebControls.WebParts
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.

ExceptionCondition
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, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0
Show: