ControlDesigner.CreateErrorDesignTimeHtml Method

Definition

Creates HTML markup to display an error message at design time.

Overloads

CreateErrorDesignTimeHtml(String)

Creates HTML markup to display a specified error message at design time.

CreateErrorDesignTimeHtml(String, Exception)

Creates the HTML markup to display a specified exception error message at design time.

CreateErrorDesignTimeHtml(String)

Creates HTML markup to display a specified error message at design time.

protected:
 System::String ^ CreateErrorDesignTimeHtml(System::String ^ errorMessage);
protected string CreateErrorDesignTimeHtml (string errorMessage);
member this.CreateErrorDesignTimeHtml : string -> string
Protected Function CreateErrorDesignTimeHtml (errorMessage As String) As String

Parameters

errorMessage
String

The error message to include in the generated HTML markup.

Returns

An HTML markup string that contains the specified error message.

Remarks

Use the CreateErrorDesignTimeHtml method to create HTML markup to display an error message for a control at design time. The value for errorMessage specifies a localized string that is displayed to the user of the control at design time.

The ControlDesigner class implementation of the CreateErrorDesignTimeHtml method returns a table with two rows, as follows:

  • The first row contains the type name and site name for the Component property of the ControlDesigner object.

  • The second row contains the input error message string.

To generate HTML markup for an error message with an associated exception, use the CreateErrorDesignTimeHtml(String, Exception) overload. To generate HTML markup for an exception without specifying a localized error message, use the GetErrorDesignTimeHtml method.

Notes to Inheritors

The CreateErrorDesignTimeHtml(String) overload is functionally equivalent to calling the CreateErrorDesignTimeHtml(String, Exception) method with e set to null.

See also

Applies to

CreateErrorDesignTimeHtml(String, Exception)

Creates the HTML markup to display a specified exception error message at design time.

protected:
 System::String ^ CreateErrorDesignTimeHtml(System::String ^ errorMessage, Exception ^ e);
protected string CreateErrorDesignTimeHtml (string errorMessage, Exception e);
member this.CreateErrorDesignTimeHtml : string * Exception -> string
Protected Function CreateErrorDesignTimeHtml (errorMessage As String, e As Exception) As String

Parameters

errorMessage
String

The error message to include in the generated HTML string.

e
Exception

The exception to include in the generated HTML string.

Returns

HTML markup that contains the specified errorMessage and e.

Remarks

Use the CreateErrorDesignTimeHtml method to provide simple HTML markup that can be used to display error and exception details for a control at design time. The value for errorMessage specifies a localized string that is displayed to the user of the control at design time.

The ControlDesigner class implementation of the CreateErrorDesignTimeHtml method returns a table with two rows, as follows:

  • The first row contains the type name and site name for the Component property of the ControlDesigner object.

  • The second row contains the input error message and the Message string of the exception.

To generate HTML markup for an error message without specifying an exception, use the CreateErrorDesignTimeHtml(String) overload. To generate HTML markup for an exception without specifying a localized error message, use the GetErrorDesignTimeHtml method.

Notes to Inheritors

The CreateErrorDesignTimeHtml(String, Exception) method should be called from the GetViewRendering or GetErrorDesignTimeHtml(Exception) method when exceptions occur.

See also

Applies to