Version

EnsureTemplate(Control) Method

This method takes a reference to a control and potentially, the children of the control, and adds them to the TemplateContainer for this UIObject, and thereby, to the control tree of the page.
Syntax
'Declaration
 
Public Overloads Sub EnsureTemplate( _
   ByVal control As Control _
) 
public void EnsureTemplate( 
   Control control
)

Parameters

control
A reference to a Control object which may also contain children that will be added to the page control tree in the same manner as an instantiated template.
Remarks
Using this method, a UserControl can be loaded from an .acx file and instantiated similarly to a template for the UIObject.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also