I have a ContentPlaceholder in my custom master that has default content. I want to always use this default content. However there are some pages in the 14 hive that have an asp:Content that superceeds the default content. Is there a way to prevent this and if so, how?

1 Answer 1


There isn't a way to prevent the ContentPlaceHolder from being 'overriden'. If you have control over the html of the masterpage, you could can:

  • Move the defaults contents outside the content placeholder (if you are sure that the content should always be present on the page). Then put a <div style="display:none">..</div> around the placeholder.
  • Do the above but put the default contents into a new placeholder with a new unique name.
  • Alter the application pages / page layouts that are implementing the placeholder.

  • Do something clever through the object model.

  • Head slap....many thanks...hate when i miss the obvious :)
    – MikeC
    Commented Nov 22, 2011 at 16:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.