This documentation is archived and is not being maintained.

ControlDesigner.GetErrorDesignTimeHtml Method

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
protected virtual string GetErrorDesignTimeHtml(
 Exception e
protected: virtual String* GetErrorDesignTimeHtml(
 Exception* e
protected function GetErrorDesignTimeHtml(
   e : Exception
) : String;


The exception that occurred.

Return Value

The HTML for the specified exception.


[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
   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 Language Filter in the upper-left corner of the page.


Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

ControlDesigner Class | ControlDesigner Members | System.Web.UI.Design Namespace