添加到 asp:SiteMapPath HTML 的 CurrentLevelsDisplayed 属性
当我使用 asp:Sitemappath 控件时,它生成的 HTML 会自动将“CurrentLevelsDisplayed”属性添加到它在站点地图周围生成的 span 节点。这在 W3C 中显然是失败的。
如何去掉 HTML 中的这个属性?我知道这是可以完成的,因为我见过带有站点地图路径控件但不生成它的项目。不幸的是,仅仅处理该控件的大部分结构似乎不起作用。
这是我目前的控制:
<asp:SiteMapPath ParentLevelsDisplayed="7"
ID="smpWebSite"
runat="server"
PathSeparator=" >> "
PathSeparatorStyle-CssClass="PathSeparator"
SiteMapProvider="Public"
OnItemCreated="SiteMapPath_ItemCreated"
>
<PathSeparatorStyle CssClass="PathSeparator"></PathSeparatorStyle>
</asp:SiteMapPath>
When I use an asp:Sitemappath control the HTML it generates automatically adds a "CurrentLevelsDisplayed" attribute to the span node it generates around the sitemap. This obviously fails in W3C.
How can I get rid of this attribute in the HTML? I know it can be done as I've seen projects with an sitemappath control that do not generate it. Unfortunatly just coping most of the structure of that control doesn't seem to work.
This is my control at the moment:
<asp:SiteMapPath ParentLevelsDisplayed="7"
ID="smpWebSite"
runat="server"
PathSeparator=" >> "
PathSeparatorStyle-CssClass="PathSeparator"
SiteMapProvider="Public"
OnItemCreated="SiteMapPath_ItemCreated"
>
<PathSeparatorStyle CssClass="PathSeparator"></PathSeparatorStyle>
</asp:SiteMapPath>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论