.NET Framework Class Library
ControlDesignerCreateErrorDesignTimeHtml 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 System.Design.dll)
Syntax
Protected Function CreateErrorDesignTimeHtml ( _
	errorMessage As [%$TOPIC/t76hhw82_en-us_VS_110_1_0_0_0_0%], _
	e As [%$TOPIC/t76hhw82_en-us_VS_110_1_0_0_0_1%] _
) As [%$TOPIC/t76hhw82_en-us_VS_110_1_0_0_0_2%]
protected [%$TOPIC/t76hhw82_en-us_VS_110_1_0_1_0_0%] CreateErrorDesignTimeHtml(
	[%$TOPIC/t76hhw82_en-us_VS_110_1_0_1_0_1%] errorMessage,
	[%$TOPIC/t76hhw82_en-us_VS_110_1_0_1_0_2%] e
)
protected:
[%$TOPIC/t76hhw82_en-us_VS_110_1_0_2_0_0%]^ CreateErrorDesignTimeHtml(
	[%$TOPIC/t76hhw82_en-us_VS_110_1_0_2_0_1%]^ errorMessage, 
	[%$TOPIC/t76hhw82_en-us_VS_110_1_0_2_0_2%]^ e
)
member CreateErrorDesignTimeHtml : 
        errorMessage:[%$TOPIC/t76hhw82_en-us_VS_110_1_0_3_0_0%] * 
        e:[%$TOPIC/t76hhw82_en-us_VS_110_1_0_3_0_1%] -> [%$TOPIC/t76hhw82_en-us_VS_110_1_0_3_0_2%]

Parameters

errorMessage
Type: SystemString

The error message to include in the generated HTML string.

e
Type: SystemException

The exception to include in the generated HTML string.

Return Value

Type: SystemString
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 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.

Version Information

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0
.NET Framework Security
Platforms

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.