Microsoft.SharePoint.WebCon ...


DelegateControl Class (Microsoft.SharePoint.WebControls)
A generic control that is able to render an ASP.NET control. Delegate controls make their child candidate controls pluggable and replaceable.

Namespace: Microsoft.SharePoint.WebControls
Assembly: Microsoft.SharePoint (in microsoft.sharepoint.dll)
Syntax

Visual Basic (Declaration)
<ParseChildrenAttribute(True)> _
<DesignerAttribute(GetType(UserControlContainerDesigner))> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel:=True)> _
<AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level:=AspNetHostingPermissionLevel.Minimal)> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel:=True)> _
<AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level:=AspNetHostingPermissionLevel.Minimal)> _
Public NotInheritable Class DelegateControl
    Inherits SPControl
Visual Basic (Usage)
Dim instance As DelegateControl
C#
[ParseChildrenAttribute(true)] 
[DesignerAttribute(typeof(UserControlContainerDesigner))] 
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel=true)] 
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] 
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel=true)] 
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] 
public sealed class DelegateControl : SPControl
Remarks

By declaring a control as an element in a Feature and giving it a priority through the Sequence attribute of the Control element, Windows SharePoint Services 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).

Inheritance Hierarchy

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

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

Tags :


Page view tracker