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

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

MenuDesigner.GetErrorDesignTimeHtml メソッド

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

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

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

Protected Overrides Function
 GetErrorDesignTimeHtml ( _
    e As Exception _
) As String
Dim e As Exception
Dim returnValue As String

returnValue = Me.GetErrorDesignTimeHtml(e)
protected override string GetErrorDesignTimeHtml
 (
    Exception e
)
protected:
virtual String^ GetErrorDesignTimeHtml (
    Exception^ e
) override
protected String GetErrorDesignTimeHtml (
    Exception e
)
protected override function GetErrorDesignTimeHtml
 (
    e : Exception
) : String

パラメータ

e

スローされた Exception オブジェクト

戻り値
エラー発生した後で関連付けられた Menuデザイン表示使用するマークアップ含んだ文字列

解説解説
使用例使用例

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 メソッド を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

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

   

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



MenuDesigner.GetErrorDesignTimeHtml メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS