BaseValidatorDesigner.GetDesignTimeHtml Method ()

Gets the markup that is used to render the associated control at design time.

Namespace: System.Web.UI.Design.WebControls
Assembly: System.Design (in system.design.dll)

public:
virtual String^ GetDesignTimeHtml () override
public String GetDesignTimeHtml ()
public override function GetDesignTimeHtml () : String
Not applicable.

Return Value

A string containing the markup used to render the BaseValidator at design time.

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.

No code example is currently available or this language may not be supported.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show: