Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
AddContentTemplate Method

MasterPage.AddContentTemplate Method

Adds a Content control to the ContentTemplates dictionary.

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

member AddContentTemplate : 
        templateName:string * 
        template:ITemplate -> unit

Parameters

templateName
Type: System.String

A unique name for the Content.

template
Type: System.Web.UI.ITemplate

The Content.

ExceptionCondition
HttpException

A Content control with the same name already exists in the ContentTemplates dictionary.

Derived master page classes can add Content controls to the ContentTemplates dictionary using the AddContentTemplate method. Derived types do not typically override the AddContentTemplate method.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0
Show:
© 2015 Microsoft