次の方法で共有


ControlDesigner.GetErrorDesignTimeHtml メソッド

指定された例外に関する情報を提供する 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 名前空間