ControlDesigner.CreateErrorDesignTimeHtml Method (String, Exception)

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

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

protected string CreateErrorDesignTimeHtml (
	string errorMessage,
	Exception e
protected String CreateErrorDesignTimeHtml (
	String errorMessage, 
	Exception e
protected function CreateErrorDesignTimeHtml (
	errorMessage : String, 
	e : Exception
) : String
Not applicable.



The error message to include in the generated HTML string.


The exception to include in the generated HTML string.

Return Value

HTML markup that contains the specified errorMessage and e.

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 ControlDesignerobject.

  • 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 method should be called from the GetViewRendering or GetErrorDesignTimeHtml method when exceptions occur.

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

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions