Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Class TemplateControlLoaderExtensions

Inheritance
System.Object
TemplateControlLoaderExtensions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Web
Assembly: EPiServer.Cms.AspNet.dll
Version: 11.20.7
Syntax
public static class TemplateControlLoaderExtensions

Methods

LoadControl(ITemplateControlLoader, HttpContextBase, IContentData, TemplateControl)

Loads the template control that is associated with the provided content item.

Declaration
public static Control LoadControl(this ITemplateControlLoader templateControlLoader, HttpContextBase httpContext, IContentData contentData, TemplateControl templateControl)
Parameters
Type Name Description
ITemplateControlLoader templateControlLoader

The loader that is being extended

System.Web.HttpContextBase httpContext

The HTTP context.

IContentData contentData

The content data that the template should be associated with.

System.Web.UI.TemplateControl templateControl

The template control used to load any user controls with.

Returns
Type Description
System.Web.UI.Control

A new template control instance or null if no template existed.

LoadControl(ITemplateControlLoader, HttpContextBase, IContentData, TemplateControl, String, IDictionary<String, Object>)

Loads the template control that is associated with the provided content item.

Declaration
public static Control LoadControl(this ITemplateControlLoader templateControlLoader, HttpContextBase httpContext, IContentData contentData, TemplateControl templateControl, string tag, IDictionary<string, object> renderSettings)
Parameters
Type Name Description
ITemplateControlLoader templateControlLoader

The loader that is being extended

System.Web.HttpContextBase httpContext

The HTTP context.

IContentData contentData

The content data that the template should be associated with.

System.Web.UI.TemplateControl templateControl

The template control used to load any user controls with.

System.String tag

The tag to match for on templates.

System.Collections.Generic.IDictionary<System.String, System.Object> renderSettings

The render settings.

Returns
Type Description
System.Web.UI.Control

A new template control instance or null if no template existed.