LoginViewDesigner.GetDesignTimeHtml Method (DesignerRegionCollection)

Note: This method is new in the .NET Framework version 2.0.

Gets the markup that is used to render the associated control at design time and populates a collection of designer regions.

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

public override string GetDesignTimeHtml (
	DesignerRegionCollection regions
)
public String GetDesignTimeHtml (
	DesignerRegionCollection regions
)
public override function GetDesignTimeHtml (
	regions : DesignerRegionCollection
) : String

Parameters

regions

A DesignerRegionCollection to which definitions of the selectable and clickable regions in the design-time view of the LoginView are added.

Return Value

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

The GetDesignTimeHtml method creates an EditableDesignerRegion object for a template editing area on the visual designer surface, and then initializes it as a template. If no templates are defined, a string is displayed that prompts you to click to begin editing. A predefined constant is used to generate the returned markup.

Notes to Inheritors This GetDesignTimeHtml overload does not call on its base method or the LoginView control to generate the markup.

The following code example shows how to override the GetDesignTimeHtml method in a class that is inherited from the LoginViewDesigner class to change the appearance of a control that is derived from the LoginView class at design time. The example draws an orange border around the control to make its extent more visible.

// Generate the design-time markup.
public override string GetDesignTimeHtml(DesignerRegionCollection regions)
{
    // Make the control more visible in the designer.   
    // Enclose the markup in a table with an orange border. 
    const string openTableMarkup =
        "<table><tr><td style=\"border:4 solid #FF7F00;\">";
    const string closeTableMarkup = "</td></tr></table>";

    // Call the base method to generate the markup.
    string markup = base.GetDesignTimeHtml(regions);

    return openTableMarkup + markup + closeTableMarkup;

} // GetDesignTimeHtml

  • Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see .

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.

.NET Framework

Supported in: 2.0
Show: