Using Multiple Content Regions and Default Content


Depending upon the requirements for each individual project, it can be interesting to define several placeholders to ensure high flexibility in the design of each individual page. The system has no limits in this respect, and you can place an unlimited number of ContentPlaceHolder controls on a page and fill them later on with content.

The option to place standard content feels quite comfortable (see Figure 4-4). You can, for example, fill the area of the footer with remarks about the copyright. Normally, this text is shown. Additionally, you have the option to replace text individually on some chosen subpages.

click to expand
Figure 4-4: You can define default content that is spread over the pages.

Caution

Please be aware that standard content is always being overwritten by any page content you put inside the placeholder. You have no choice about endorsing the existing content. Therefore, you must decide between the use of standard or individual content.

Tip

If you've already placed content and you want to replace it later on with standard content, you just use the command Default To Master's Content from the Task List of the particular Content control.




ASP. NET 2.0 Revealed
ASP.NET 2.0 Revealed
ISBN: 1590593375
EAN: 2147483647
Year: 2005
Pages: 133

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net