以编程方式删除asp:content [英] remove asp:content programatically
本文介绍了以编程方式删除asp:content的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的page.aspx包含覆盖母版页的代码,它是动态生成的:
my page.aspx contains this code that overrides the masterpage, and it is dynamically generated:
<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>
我可以构建一个代码(C#)来访问page.aspx并通过功能激活删除这些内容n在sharepoint中?
can I construct a code (C#) that will access page.aspx and delete this content via feature activation in sharepoint?
推荐答案
资源:wss,navigation_accesskey %>
UseSimpleRendering = true
< span class =code-attribute> UseSeparateCss = < span class =code-keyword> false
< span class =code-attribute> 方向 = 水平
StaticDisplayLevels = 2
AdjustForShowStartingNode = < span class =code-keyword> true
MaximumDynamicDisplayLevels = 2
< span class =code-attribute> SkipLinkText = / >
< asp:SiteMapDataSource
ShowStartingNode = False
SiteMapProvider = SPNavigationProvider < span class =code-attribute>
id = vanillaTopSiteMap
runat = < span class =code-keyword> server
StartingNodeUrl = sid:1002 / >
< / asp:Content >
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>
我可以构建一个访问页面的代码(C#) .aspx并通过sharepoint中的功能激活删除此内容?
can I construct a code (C#) that will access page.aspx and delete this content via feature activation in sharepoint?
这篇关于以编程方式删除asp:content的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文