System.Web.UI.Design.ControlDesigner.CreateErrorDesignTimeHtml Method

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

Syntax

protected string CreateErrorDesignTimeHtml (string errorMessage, Exception e)

Parameters

errorMessage
The error message to include in the generated HTML string.
e
The exception to include in the generated HTML string.

Returns

HTML markup that contains the specified errorMessage and e.

Remarks

Use the ControlDesigner.CreateErrorDesignTimeHtml(string, Exception) 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 System.Web.UI.Design.ControlDesigner class implementation of the ControlDesigner.CreateErrorDesignTimeHtml(string, Exception) method returns a table with two rows, as follows:

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

Requirements

Namespace: System.Web.UI.Design
Assembly: System.Design (in System.Design.dll)
Assembly Versions: 2.0.0.0