CreateUserWizardDesigner.GetErrorDesignTimeHtml Method (Exception)
.NET Framework (current version)
Gets the HTML that provides information about the specified exception. This method is typically called after an error has been encountered at design time.
Assembly: System.Design (in System.Design.dll)
Parameters
- e
-
Type:
System.Exception
The exception that occurred.
The following code example demonstrates how to override the GetErrorDesignTimeHtml method to display debugging information on the design surface in case of an error.
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; } } }
.NET Framework
Available since 2.0
Available since 2.0
Show: