Share via


PlaceHolder

The PlaceHolder control enables you to place an empty container control within the page and then dynamically add, remove, or loop through child elements at run time. The control only renders its child elements; it has no HTML-based output of its own.

As an example, you might want to have a variable number of buttons appear on a web page, depending on options selected by users. That way, users are not confronted with potentially confusing choices that are either unavailable or not relevant to their individual needs.

Add a PlaceHolder control to your page when you want to dynamically add, remove, or loop through controls at run time.

To add a PlaceHolder control to a page

  • Drag the PlaceHolder control from the Toolbox panel to your page.

For a full description of all PlaceHolder control properties, see PlaceHolder Properties Cc295504.xtlink_newWindow(en-us,Expression.40).png in the MSDN library.

For information about adding controls to a PlaceHolder control at run-time, see How to: Add PlaceHolder Web Server Controls to a Web Forms Page Cc295504.xtlink_newWindow(en-us,Expression.40).png in the MSDN library.

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