PlaceHolder control

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 task pane to your page.

For a full description of all PlaceHolder control properties, see PlaceHolder in the MSDN library.

For information about adding controls to a PlaceHolder control at run-time, see How to: Add in the MSDN library.