Export (0) Print
Expand All

ErrorWebPart Constructor

Note: This constructor is new in the .NET Framework version 2.0.

Initializes a new instance of the control.

Namespace: System.Web.UI.WebControls.WebParts
Assembly: System.Web (in system.web.dll)

public ErrorWebPart (
	string originalID,
	string originalTypeName,
	string originalPath,
	string genericWebPartID
)
public ErrorWebPart (
	String originalID, 
	String originalTypeName, 
	String originalPath, 
	String genericWebPartID
)
public function ErrorWebPart (
	originalID : String, 
	originalTypeName : String, 
	originalPath : String, 
	genericWebPartID : String
)

Parameters

originalID

A string that is the control ID (not the unique ID) of the failing control. If a GenericWebPart control is involved in the failure, the ID is the ID of its child server control.

originalTypeName

A string that is the name of the Type of the failed control. If a GenericWebPart control is involved in the failure, the type name is the type of its child server control.

originalPath

A string that contains the path to a user control, if a GenericWebPart control that contains a child user control is involved in the failure.

genericWebPartID

A string that returns the ID of a GenericWebPart control, if that type of control was involved in the failure to load or create a control. This is needed for controls that do not inherit from the WebPart base class.

The WebPartManager control creates a new instance of the ErrorWebPart control when it fails in an attempt to load or create an instance of a dynamic WebPart control. Dynamic controls are controls that are added to a page programmatically, or by a user who adds the control from a catalog of controls, as opposed to static controls that are declared in the markup of a Web page.

The ErrorWebPart method simply creates an instance of the base class, passing to it the four parameters that contain information about the failed control.

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

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

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show:
© 2014 Microsoft