Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
my page.aspx contains this code that overrides the masterpage, and it is dynamically generated:

XML
<asp:Content ContentPlaceHolderId="PlaceHolderTopNavBar" runat="server">
    <SharePoint:AspMenu
        ID="TopNavigationMenu"
        Runat="server"
        EnableViewState="false"
        DataSourceID="vanillaTopSiteMap"
        AccessKey="<%$Resources:wss,navigation_accesskey%>"
        UseSimpleRendering="true"
        UseSeparateCss="false"
        Orientation="Horizontal"
        StaticDisplayLevels="2"
        AdjustForShowStartingNode="true"
        MaximumDynamicDisplayLevels="2"
        SkipLinkText=""/>

    <asp:SiteMapDataSource
        ShowStartingNode="False"
        SiteMapProvider="SPNavigationProvider"
        id="vanillaTopSiteMap"
        runat="server"
        StartingNodeUrl="sid:1002"/>
</asp:Content>



can I construct a code (C#) that will access page.aspx and delete this content via feature activation in sharepoint?
Posted
Comments
Pradip R 4-Mar-15 1:13am    
As per my understanding, it is not possible to hide content placeholder programatically for particular page. I would suggest you to hide the content instead of deleting.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900