MasterPage.AddContentTemplate Method (String, ITemplate)

 

Adds a Content control to the ContentTemplates dictionary.

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

Protected Friend Sub AddContentTemplate (
	templateName As String,
	template As ITemplate
)

Parameters

templateName
Type: System.String

A unique name for the Content.

template
Type: System.Web.UI.ITemplate

The Content.

Exception Condition
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
Available since 2.0
Return to top
Show: