DataListDesigner.GetErrorDesignTimeHtml(Exception) メソッド

定義

コントロールのレンダリング中にエラーが発生したときに、指定した例外のデザイン時に表示する HTML を取得します。

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

パラメーター

e
Exception

発生した例外。

返品

指定した例外のデザイン時に表示される HTML。

次のコード例は、 GetErrorDesignTimeHtml メソッドをオーバーライドして、例外が発生したときにデザインサーフェイス上の DataList コントロールの外観を変更する方法を示しています。

このコード例は、 DataListDesigner クラスに提供されるより大きな例の一部です。

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

適用対象

こちらもご覧ください