This documentation is archived and is not being maintained.

LoginDesigner Class

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

Provides design-time support in a visual designer for the Login Web-server control.

Namespace: System.Web.UI.Design.WebControls
Assembly: System.Design (in

public ref class LoginDesigner : public CompositeControlDesigner
public class LoginDesigner extends CompositeControlDesigner
public class LoginDesigner extends CompositeControlDesigner

The Login control displays a user interface that allows a user to log on to the host Web site.

In a visual designer, when you switch from Source to Design view, the markup source code that describes the Login control is parsed and a design-time version of the control is created on the design surface. When you switch back to Source view, the design-time control is persisted to the markup source code and edited into the markup for the Web page. The LoginDesigner class provides design-time support for the Login control.

The LoginDesigner class properties provide the following functionality:

  • The ActionLists property returns a DesignerActionListCollection object, which typically contains an object that is derived from the DesignerActionList class for each level in the inheritance tree of the designer.

  • The AutoFormats property returns a collection of formatting schemes for display in the Auto Format dialog box.

  • The TemplateGroups property returns a collection of template groups for the fields of the associated Login control and the top-level Login template.

  • The UsePreviewControl property always returns true, indicating that the designer creates a temporary copy of the associated Login to generate the design-time markup.

The LoginDesigner class methods provide the following functionality:

  • The GetDesignTimeHtml method returns the markup that is used to render the associated Login at design time.

  • The GetEditableDesignerRegionContent method returns a serialized copy of the template for the associated Login.

  • The GetErrorDesignTimeHtml method provides the markup that is used to render the associated Login at design time when an error has occurred.

  • The Initialize method prepares the designer to view, edit, and design the associated Login.

  • The PreFilterProperties method is used to remove properties from, add additional properties to, or shadow properties of the associated Login.

  • The SetEditableDesignerRegionContent method sets a region of the associated Login from a serialized copy of a control template.

The following code example shows how to extend the LoginDesigner class to change the appearance of controls that are derived from the Login control at design time.

The example derives the MyLogin control from the Login. The MyLogin is a copy of the Login control. The example also derives the MyLoginDesigner class from the LoginDesigner and applies a DesignerAttribute attribute for the MyLoginDesigner on the MyLogin control.

The MyLoginDesigner overrides the PreFilterProperties method to make the NamingContainer property visible in the Properties grid at design time. It overrides the GetDesignTimeHtml method to draw a blue, dashed border around the control to make its extent more visible, if the BorderStyle property of the MyLogin control is the NotSet or None value. It overrides the GetErrorDesignTimeHtml method to generate the markup for a placeholder that includes the error message rendered in red, bold text.

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

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

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