开发者

looking for asp.net navigation menu editor with source code

开发者_运维知识库web-based so it can be used by users and hopefully using the class SQLSiteMapProvider which allows for saving sitemap in a SQL Database instead of XML.


You may create the menu using following or similar code. More details are here in following Tutorial at Asp.Net You may modify this code block and use SQLSiteMapProvider instead of SiteMapDataSource

<div id="navigation">
    <ul>
        <li><asp:HyperLink runat="server" ID="lnkHome"
         NavigateUrl="~/Default.aspx">Home</asp:HyperLink></li>

        <asp:Repeater runat="server" ID="menu"
          DataSourceID="SiteMapDataSource1">
            <ItemTemplate>
                <li>
                    <asp:HyperLink runat="server"
                    NavigateUrl='<%# Eval("Url") %>'>
                    <%# Eval("Title") %></asp:HyperLink>
                </li>
            </ItemTemplate>
        </asp:Repeater>
    </ul>

    <asp:SiteMapDataSource ID="SiteMapDataSource1"
      runat="server" ShowStartingNode="false" />
</div>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜