MasterPage::AddContentTemplate Method (String^, ITemplate^)
.NET Framework (current version)
Adds a Content control to the ContentTemplates dictionary.
Assembly: System.Web (in System.Web.dll)
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
Available since 2.0
Show: