UpdatePanel.Controls Property

Definition

Gets the ControlCollection object that contains the child controls for the UpdatePanel control.

C#
public override sealed System.Web.UI.ControlCollection Controls { get; }

Property Value

The collection of child controls for the UpdatePanel control.

Exceptions

The Add(Control), AddAt(Int32, Control), Clear(), Remove(Control), or RemoveAt(Int32) method of the ControlCollection class has been called. To change the content of the UpdatePanel control, modify the child controls of the ContentTemplateContainer property.

Remarks

The Controls property is overridden from the base Control class and sealed to prevent additional derivation. To add controls to the UpdatePanel control declaratively, create a <ContentTemplate> element inside the UpdatePanel control markup. To add controls to the UpdatePanel control programmatically, use the ContentTemplateContainer property.

Applies to

Product Versions
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also