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.
Reference
BaseValidatorDesigner ClassBaseValidatorDesigner Members
System.Web.UI.Design.WebControls Namespace
BaseValidator
ErrorMessage
Display
ValidatorDisplay
ControlDesigner.GetDesignTimeHtml
PreviewControlDesigner
ControlDesigner
Other Resources
Introduction to ASP.NET Control DesignersWalkthrough: Creating a Basic Control Designer for a Web Server Control