Export (0) Print
Expand All

ContentPlaceholder

A ContentPlaceHolder control defines a relative region for content in a master page, and renders all text, markup, and server controls from a related Content control found in a content page.

A Content control is associated with a ContentPlaceHolder using its ContentPlaceHolderID property. Set the ContentPlaceHolderID property to the value of the ID property of the related ContentPlaceHolder control in a master page. More than one ContentPlaceHolder can be declared in a master page.

Within a content page, only one Content control can supply the content for a ContentPlaceHolder in the master page. However, in each content page that uses a master page, you can have separate Content controls associated with the ContentPlaceHolder. For example, you can define the ContentPlaceHolder for the page title in a master page. For each content page that uses the master page, you can add a Content control that supplies the text and markup for the page title.

NoteNote

For XHTML compliance, an empty title element is created if a title has not been defined or cannot be found.

You can specify default content placed within the ContentPlaceHolder control tags, but this content is replaced by any content in an associated content page.

For more information about the ContentPlaceHolder control, see ContentPlaceHolder Class Cc295268.xtlink_newWindow(en-us,Expression.40).png in the MSDN library.

See also

Send feedback about this topic to Microsoft. © 2011 Microsoft Corporation. All rights reserved.

Community Additions

ADD
Show:
© 2014 Microsoft