| |||||
ContentPlaceHolder Control SyntaxASP.NET Syntax ASP.NET Syntax for Web Controls Defines a region for content in an ASP.NET master page. For information on the individual members of this class, see ContentPlaceHolder in the class library. RemarksA ContentPlaceHolder control specifies a place or a section in a master page, to hold the contents of an associated Content control. A master page can have one or more <asp:contentplaceholder> controls. To associate a Content control to a ContentPlaceHolder in a master page, the Content control's ContentPlaceHolderID property is set to the value of the ID property of the ContentPlaceHolder control.
Syntax ExampleThis site is an actual example of using master pages. This page is actually made up of Content controls, which in turn make up the content of <asp:contentplaceholder> controls defined in the master page file. To see how this page and its master page is done, click here. Notice that there is no reference to the master page file on this page. This is because references to the master page files used on this site are stored in web.config files that cover different subsections of this site. <configuration>
<system.web>
<pages masterPageFile = "~/aspnet/aspnet.master" />
</system.web>
</configuration>
This way, any file ( that includes <asp:content> controls ) within the application boundary covered by the web.config file, automatically use the referenced master page file. See Also |
| ||||
Check out related books at Amazon
© 2000-2008 Rey Nuñez All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note
You can help support aspxtreme