デザイン時において、コントロールの表示中にエラーが発生した場合に指定した例外を表示する HTML を取得します。
Overrides Protected Function GetErrorDesignTimeHtml( _
ByVal e As Exception _) As String
[C#]
protected override string GetErrorDesignTimeHtml(Exceptione);
[C++]
protected: String* GetErrorDesignTimeHtml(Exception* e);
[JScript]
protected override function GetErrorDesignTimeHtml(
e : Exception) : String;
パラメータ
- e
エラー メッセージを表示する Exception 。
戻り値
デザイン時に指定した例外を表示する HTML。
使用例
[Visual Basic] GetErrorDesignTimeHtml メソッドをオーバーライドして、 SimpleDataListDesigner
クラスに、カスタム文字列を返すコード例を次に示します。このカスタム文字列は、 GetErrorDesignTimeHtml が呼び出されたときにデザイン画面に表示されます。
[Visual Basic] このコード例は、 System.DataListDesigner クラスのトピックで取り上げているコード例の一部分です。
' Write a string to the design surface if an error
' occurs while trying to render to the designer.
Overrides Protected Function GetErrorDesignTimeHtml(exc As Exception) As String
Debug.Fail(exc.ToString())
Return CreatePlaceHolderDesignTimeHtml( _
"<b>An error occurred!</b>.<br>Check that all properties are valid.")
End Function
[C#, C++, JScript] C#、C++、および JScript のサンプルはありません。Visual Basic のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 2000, Windows XP Professional, Windows Server 2003 ファミリ
.NET Framework セキュリティ:
- 直前の呼び出し元の完全信頼。このメンバは、部分的に信頼されているコードから使用することはできません。詳細の参照先 : 部分信頼コードからのライブラリの使用
参照
DataListDesigner クラス | DataListDesigner メンバ | System.Web.UI.Design.WebControls 名前空間