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

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

ControlDesigner.GetErrorDesignTimeHtml メソッド

指定された例外に関する情報を提供する HTML マークアップを取得します。

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

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

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

パラメータ

e

発生した例外。

戻り値
指定された例外のデザイン時 HTML マークアップ。

解説解説
使用例使用例

エラーが発生した場合にコントロールのデザイン時 HTML マークアップを生成し、CreatePlaceHolderDesignTimeHtml メソッドを呼び出す方法のコード例を次に示します。

' 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
 e) 
{
    // Write the error message text in red, bold.
    string errorRendering =
        "<span style=\"font-weight:bold; color:Red; \">"
 +
        e.Message + "</span>";

    return CreatePlaceHolderDesignTimeHtml(errorRendering);
} // GetErrorDesignTimeHtml
.NET Framework のセキュリティ.NET Framework のセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ControlDesigner クラス
ControlDesigner メンバ
System.Web.UI.Design 名前空間
GetDesignTimeHtml
CreateErrorDesignTimeHtml
その他の技術情報
Web フォームのデザイン時サポート


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

英和和英テキスト翻訳

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

辞書ショートカット

すべての辞書の索引

「ControlDesigner.GetErrorDesignTimeHtml メソッド」の関連用語

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

   

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



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

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

©2026 GRAS Group, Inc.RSS