Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ControlDesigner.CreateErrorDesignTimeHtml Method (String)

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

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

protected string CreateErrorDesignTimeHtml(
	string errorMessage
)

Parameters

errorMessage
Type: System.String

The error message to include in the generated HTML markup.

Return Value

Type: System.String
An HTML markup string that contains the specified error message.

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.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0
Show:
© 2015 Microsoft