ContentTemplateContainer Property

UpdatePanel.ContentTemplateContainer Property


Gets a control object to which you can programmatically add child controls.

Namespace:   System.Web.UI
Assembly:  System.Web.Extensions (in System.Web.Extensions.dll)

member ContentTemplateContainer : Control with get

Property Value

Type: System.Web.UI.Control

A Control object that defines the content of the UpdatePanel control.

The ContentTemplateContainer property enables you to programmatically add child controls to the UpdatePanel control without having to define a custom template that inherits from the ITemplate interface. If you are adding content to the UpdatePanel control declaratively or through a designer, you should add content to the ContentTemplate property by using a <ContentTemplate> element.

The following example shows how to programmatically specify the ContentTemplateContainer property of an UpdatePanel control. The Text property of a Label control is set when Button1 is clicked.

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

.NET Framework
Available since 3.5
Return to top
© 2016 Microsoft