Mar 7, 2009

ContentPlaceHolder trick

  • ContentPlaceHolder in master page is reference in Content control in content page
  • Content control's Id can be empty, but the ContentPlaceHolderID need to be filled. The position of Content control in content page does not matter.
  • In ContentPlaceHolder, you can fill in some default content. But they will be override once content page reference it.
  • If you use nested ContentPlaceHolder and you want to fill the content, its parent ContentPlaceHolder can not be reference, otherwise, the content in nested ContentPlaceHolder will not be used.

No comments:

Post a Comment