This documentation is archived and is not being maintained.
ControlDesigner.GetErrorDesignTimeHtml Method
.NET Framework 1.1
Gets the HTML that provides information about the specified exception. This method is typically called after an error has been encountered at design time.
[Visual Basic] Protected Overridable Function GetErrorDesignTimeHtml( _ ByVal e As Exception _ ) As String [C#] protected virtual string GetErrorDesignTimeHtml( Exception e ); [C++] protected: virtual String* GetErrorDesignTimeHtml( Exception* e ); [JScript] protected function GetErrorDesignTimeHtml( e : Exception ) : String;
Parameters
- e
- The exception that occurred.
Return Value
The HTML for the specified exception.
Example
[Visual Basic] The following code example overrides the GetErrorDesignTimeHtml method to return a placeholder string, created by a call to the CreatePlaceHolderDesignTimeHtml method.
[Visual Basic]
' Override the GetErrorDesignTimeHtml to display an
' error message if an error occurs in design-time rendering of
' the control.
Protected Overrides Function GetErrorDesignTimeHtml(e As Exception) As String
Debug.Fail(e.ToString())
Return CreatePlaceHolderDesignTimeHtml("There was an error rendering the control.<br>Make sure 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
ControlDesigner Class | ControlDesigner Members | System.Web.UI.Design Namespace
Show: