LoadControl loads a control and returns a reference to the control

Namespace: DotNetNuke.UI
Assembly: DotNetNuke (in DotNetNuke.dll)

Syntax

C#
public static T LoadControl<T>(
	TemplateControl containerControl,
	string ControlSrc
)
where T : Control
Visual Basic
Public Shared Function LoadControl(Of T As Control) ( 
	containerControl As TemplateControl,
	ControlSrc As String
) As T

Parameters

containerControl
Type: System.Web.UI..::..TemplateControl
The parent Container Control
ControlSrc
Type: System..::..String
The source for the control. This can either be a User Control (.ascx) or a compiled control.

Type Parameters

T
The type of control to Load

Return Value

A Control of type T

See Also