Export (0) Print
Expand All

DelegateControl class

A generic control that is able to render an ASP.NET control. Delegate controls make their child candidate controls pluggable and replaceable.

System.Object
  System.Web.UI.Control
    Microsoft.SharePoint.WebControls.SPControl
      Microsoft.SharePoint.WebControls.DelegateControl

Namespace:  Microsoft.SharePoint.WebControls
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public sealed class DelegateControl : SPControl

By declaring a control as an element in a Feature and giving it a priority through the Sequence attribute of the Control element, SharePoint Foundation selects the declared control candidate and instantiates it as a child of the delegate control. At run time, this delegate control accepts the union of control elements declared at the server farm, Web application, site collection, and Web site levels. The control that has the lowest sequence number is added to the control tree through the DelegateControl.

Delegate controls for which the AllowMultipleControls property equals true can host more than one child control. If there are multiple delegate control candidates, they are all added as children at runtime in the order specified by the Sequence attribute. For example, by default the AllowMultipleControls property is used in the AdditionalPageHead delegate control to allow multiple child controls to be added to any page that contains the delegate control.

NoteNote

Members of the DelegateControl class are only intended for use by ASP.NET and are not meant to be called directly from code.

For more information about the delegate control Feature, see Delegate Control (Control Templatization and Lightup).

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

Community Additions

Show:
© 2014 Microsoft