CreateUserWizardDesigner.GetErrorDesignTimeHtml メソッド
アセンブリ: System.Design (system.design.dll 内)

Dim e As Exception Dim returnValue As String returnValue = Me.GetErrorDesignTimeHtml(e)
戻り値
指定された例外の HTML。

GetErrorDesignTimeHtml メソッドをオーバーライドし、エラーが発生した場合にデバッグ情報をデザイン サーフェイスに表示するコード例を次に示します。
Imports System Imports System.IO Imports System.ComponentModel Imports System.Web.UI Imports System.Web.UI.Design Imports System.Web.UI.Design.WebControls Imports System.Web.UI.WebControls Imports Examples.WebNet Namespace Examples.WebNet ' Create a class that extends CreateUserWizardDesigner. Public Class MyCreateUserWizardDesigner Inherits CreateUserWizardDesigner ' This variable contains debugging information. Private debugInfo As String = "Useful information." ' Override the GetErrorDesignTimeHtml method to add some more ' information to the error message. Protected Overrides Function GetErrorDesignTimeHtml(ByVal e As Exception) As String ' Get the error message from the base class. Dim htmlStr As String htmlStr = MyBase.GetErrorDesignTimeHtml(e) ' Append the debugging information to it. htmlStr &= "<br>DebugInfo: " & debugInfo ' Return the error message. Return htmlStr End Function End Class End Namespace
using System; using System.IO; using System.ComponentModel; using System.Web.UI.WebControls; using System.Web.UI; using System.Web.UI.Design; using System.Web.UI.Design.WebControls; //using Examples.WebNet.Design; namespace Examples.WebNet { // Create a class that extends CreateUserWizardDesigner. public class MyCreateUserWizardDesigner : CreateUserWizardDesigner { // This variable contains debugging information. private string debugInfo = "Useful information."; // Override the GetErrorDesignTimeHtml method to add some more // information to the error message. protected override string GetErrorDesignTimeHtml(Exception e) { // Get the error message from the base class. string html = base.GetErrorDesignTimeHtml(e); // Append the debugging information to it. html += "<br>" + "DebugInfo: " + debugInfo; // Return the error message. return html; } } }


Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- CreateUserWizardDesigner.GetErrorDesignTimeHtml メソッドのページへのリンク