I was customizing SharePoint 2010 Master Pages and criteria were not to let certain content placeholders to show up on the page. I went ahead and commented these elements out. – WRONG!!!!

 Came to know this hard way, as i had commented one of the placeholders (PlaceHolderPageTitleInTitleArea), user was getting the error “You must specify a value for this required field” , started digging through the master page found out the mistake and fixed it by adding and panel wrap around for the content placeholder as mentioned below

 Method: 1

<asp:panel runat=”server” Style=”display:none;”>
<asp:ContentPlaceHolder id=”PlaceHolderPageTitleInTitleArea” runat=”server” />
</asp:panel>

Method: 2

You can also use external css class

Create a simple CSS class as shown below:

.hiddenpanel
{
visibility:hidden;
}

And use an asp:panel to hide your content placeholder(s):

<asp:panel runat=”server” cssclass=”hiddenpanel”>
<asp:contentplaceholder id=”PlaceHolderPageTitleInTitleArea” runat=”server” />
</asp:panel>

Prefer the Method: 1

Below is list of content placeholders in SharePoint 2010, you might come across the same issue

PlaceHolderPageTitle PlaceHolderAdditionalPageHead PlaceHolderBodyAreaClass
PlaceHolderTitleAreaClass PlaceHolderGlobalNavigation PlaceHolderGlobalNavigationSiteMap
PlaceHolderTitleBreadcrumb PlaceHolderSiteName PlaceHolderPageTitleInTitleArea
PlaceHolderPageDescription PlaceHolderSearchArea PlaceHolderTopNavBar
PlaceHolderHorizontalNav PlaceHolderLeftNavBar PlaceHolderLeftNavBarDataSource
PlaceHolderLeftActions PlaceHolderQuickLaunchTop PlaceHolderCalendarNavigator
SPNavigation WSSDesignConsole PlaceHolderLeftNavBarTop
PlaceHolderUtilityContent PlaceHolderFormDigest PlaceHolderQuickLaunchBottom
PlaceHolderPageImage PlaceHolderTitleLeftBorder PlaceHolderQuickLaunchBottomV3
PlaceHolderMiniConsole PlaceHolderTitleRightMargin PlaceHolderQuickLaunchBottomV4
PlaceHolderNavSpacer PlaceHolderBodyLeftBorder PlaceHolderTitleAreaSeparator
PlaceHolderMain PlaceHolderBodyRightMargin PlaceHolderLeftNavBarBorder
Advertisements