DataListDesigner.GetErrorDesignTimeHtml(Exception) Metod

Definition

Hämtar HTML-koden att visas vid designtillfället för det angivna undantaget när ett fel har påträffats när kontrollen återges.

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

Parametrar

e
Exception

Undantaget som inträffade.

Returer

HTML-koden visas vid designtillfället för det angivna undantaget.

Exempel

I följande kodexempel visas hur du åsidosätter GetErrorDesignTimeHtml metoden för att ändra kontrollens DataList utseende på designytan när ett undantag inträffar.

Det här kodexemplet är en del av ett större exempel för DataListDesigner klassen.

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

Gäller för

Se även