DataListDesigner.GetErrorDesignTimeHtml Method
Gets the HTML to display at design-time for the specified exception when an error has been encountered while rendering the control.
[Visual Basic] Overrides Protected Function GetErrorDesignTimeHtml( _ ByVal e As Exception _ ) As String [C#] protected override string GetErrorDesignTimeHtml( Exception e ); [C++] protected: String* GetErrorDesignTimeHtml( Exception* e ); [JScript] protected override function GetErrorDesignTimeHtml( e : Exception ) : String;
Parameters
- e
- The Exception to display the error message for.
Return Value
The HTML displayed at design-time for the specified exception.
Example
[Visual Basic] The following code example overrides the GetErrorDesignTimeHtml method to return to the SimpleDataListDesigner class a custom string that will be displayed on the design surface when the GetErrorDesignTimeHtml is called.
[Visual Basic] This code example is part of a larger example provided for the System.DataListDesigner class.
[Visual Basic]
' Write a string to the design surface if an error
' occurs while trying to render to the designer.
Overrides Protected Function GetErrorDesignTimeHtml(exc As Exception) As String
Debug.Fail(exc.ToString())
Return CreatePlaceHolderDesignTimeHtml( _
"<b>An error occurred!</b>.<br>Check that all properties are valid.")
End Function
[C#, C++, JScript] No example is available for C#, C++, or JScript. To view a Visual Basic example, click the Language Filter button
in the upper-left corner of the page.
Requirements
Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family
.NET Framework Security:
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries From Partially Trusted Code
See Also
DataListDesigner Class | DataListDesigner Members | System.Web.UI.Design.WebControls Namespace