指定された例外に関する情報を提供する HTML を取得します。このメソッドは通常、デザイン時に、エラーが発生した後に呼び出されます。
Protected Overridable Function GetErrorDesignTimeHtml( _
ByVal e As Exception _) As String
[C#]
protected virtual string GetErrorDesignTimeHtml(Exceptione);
[C++]
protected: virtual String* GetErrorDesignTimeHtml(Exception* e);
[JScript]
protected function GetErrorDesignTimeHtml(
e : Exception) : String;
パラメータ
- e
発生した例外。
戻り値
指定された例外の HTML。
使用例
[Visual Basic] GetErrorDesignTimeHtml メソッドをオーバーライドして、 CreatePlaceHolderDesignTimeHtml メソッドの呼び出しの結果作成されたプレースホルダ文字列を返すコード例を次に示します。
' Override the GetErrorDesignTimeHtml to display an
' error message if an error occurs in design-time rendering of
' the control.
Protected Overrides Function GetErrorDesignTimeHtml(e As Exception) As String
Debug.Fail(e.ToString())
Return CreatePlaceHolderDesignTimeHtml("There was an error rendering the control.<br>Make sure all properties are valid.")
End Function
[C#, C++, JScript] C#、C++、および JScript のサンプルはありません。Visual Basic のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 2000, Windows XP Professional, Windows Server 2003 ファミリ
.NET Framework セキュリティ:
- 直前の呼び出し元の完全信頼。このメンバは、部分的に信頼されているコードから使用することはできません。詳細の参照先 : 部分信頼コードからのライブラリの使用
参照
ControlDesigner クラス | ControlDesigner メンバ | System.Web.UI.Design 名前空間