MenuDesigner.GetErrorDesignTimeHtml メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > MenuDesigner.GetErrorDesignTimeHtml メソッドの意味・解説 

MenuDesigner.GetErrorDesignTimeHtml メソッド

メモ : このメソッドは、.NET Framework version 2.0 で新しく追加されたものです。

エラーが発生した場合に、関連付けられたコントロールをデザイン時表示するためのマークアップを提供します。

名前空間: System.Web.UI.Design.WebControls
アセンブリ: System.Design (system.design.dll 内)
構文構文

解説解説
使用例使用例

MenuDesigner クラスから継承したクラスの GetErrorDesignTimeHtml メソッドをオーバーライドする方法を次のコード例に示します。オーバーライドされたメソッドは、デザイン時に Menu クラスから派生したコントロールの外観を変更します。この例では、赤の太字で表示されるエラー メッセージを含んだプレースホルダのマークアップを生成しています。

' Generate the design-time markup for the control when an error occurs.
Protected Overrides Function
 GetErrorDesignTimeHtml( _
    ByVal ex As Exception) As
 String

    ' Write the error message text in red, bold.
    Dim errorRendering As String
 = _
        "<span style=""font-weight:bold;
 color:Red; "">" & _
        ex.Message & "</span>"

    Return CreatePlaceHolderDesignTimeHtml(errorRendering)

End Function ' GetErrorDesignTimeHtml
// Generate the design-time markup for the control when an error occurs.
protected override string GetErrorDesignTimeHtml(Exception
 ex) 
{
    // Write the error message text in red, bold.
    string errorRendering =
        "<span style=\"font-weight:bold; color:Red; \">"
 +
        ex.Message + "</span>";

    return CreatePlaceHolderDesignTimeHtml(errorRendering);
} // GetErrorDesignTimeHtml
.NET Framework のセキュリティ.NET Framework のセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からMenuDesigner.GetErrorDesignTimeHtml メソッドを検索した結果を表示しています。
Weblioに収録されているすべての辞書からMenuDesigner.GetErrorDesignTimeHtml メソッドを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からMenuDesigner.GetErrorDesignTimeHtml メソッド を検索

英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

MenuDesigner.GetErrorDesignTimeHtml メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



MenuDesigner.GetErrorDesignTimeHtml メソッドのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS