BaseValidatorDesigner.GetDesignTimeHtml Method ()
Assembly: System.Design (in system.design.dll)
If the ErrorMessage or Text property of the associated control that is derived from the BaseValidator class is an empty string (""), or if the Display property is set to the None field, the GetDesignTimeHtml method sets the ErrorMessage property to the control ID, which is enclosed in brackets ([]) and sets the Display property to the Static field. The GetDesignTimeHtml then calls the GetDesignTimeHtml base method to generate the markup, and restores the control properties to their original values, if necessary.
The following code example shows how to override the GetDesignTimeHtml method that draws a solid border around the associated control at design time if the value of the BorderStyle property of the control is set to the NotSet or None field.
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
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
Reference
BaseValidatorDesigner ClassBaseValidatorDesigner Members
System.Web.UI.Design.WebControls Namespace
BaseValidator
ErrorMessage
Display
ValidatorDisplay
ControlDesigner.GetDesignTimeHtml
BaseValidator
PreviewControlDesigner
ControlDesigner Class
Other Resources
ASP.NET Control Designers OverviewWalkthrough: Creating a Basic Control Designer for a Web Server Control