DataListDesigner.GetErrorDesignTimeHtml(Exception) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the HTML to display at design time for the specified exception when an error has been encountered while rendering the control.
protected:
override System::String ^ GetErrorDesignTimeHtml(Exception ^ e);
protected override string GetErrorDesignTimeHtml (Exception e);
override this.GetErrorDesignTimeHtml : Exception -> string
Protected Overrides Function GetErrorDesignTimeHtml (e As Exception) As String
Parameters
The exception that occurred.
Returns
The HTML displayed at design time for the specified exception.
Examples
The following code example shows how to override the GetErrorDesignTimeHtml method to modify the appearance of the DataList control on the design surface when an exception occurs.
This code example is part of a larger example provided for the DataListDesigner class.
protected override string
GetErrorDesignTimeHtml(System.Exception exc)
{
return CreatePlaceHolderDesignTimeHtml(
"ASPNET.Examples: An error occurred while rendering the GridView.");
}
Protected Overrides Function _
GetErrorDesignTimeHtml(ByVal exc As Exception) As String
Return CreatePlaceHolderDesignTimeHtml( _
"ASPNET.Examples: An error occurred while rendering the GridView.")
End Function