แก้ไข

แชร์ผ่าน


ErrorWebPart(String, String, String, String) Constructor

Definition

Initializes a new instance of the control.

public:
 ErrorWebPart(System::String ^ originalID, System::String ^ originalTypeName, System::String ^ originalPath, System::String ^ genericWebPartID);
public ErrorWebPart (string originalID, string originalTypeName, string originalPath, string genericWebPartID);
new System.Web.UI.WebControls.WebParts.ErrorWebPart : string * string * string * string -> System.Web.UI.WebControls.WebParts.ErrorWebPart
Public 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 failing control. If a GenericWebPart control is involved in the failure, the ID is the ID of its child server control.

originalTypeName
String

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
String

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
String

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.

Remarks

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.

Applies to

See also