468,251 Members | 1,381 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,251 developers. It's quick & easy.

DataList and dataSource issues

I have the following code. Is there another way to simplify it but get the
exact same thing done? It is a DataList that gets the nodes from a
SiteMapDataSource and displays them on the page as a list of links.

<asp:DataList runat="server" ID="EternityRecordsNavigationLinks"
DataSourceID="SiteMapDataSource1" Caption="Eternity Records"
CssClass="EternityRecordsNavigationLinks" UseAccessibleHeader="True">

<HeaderTemplate>

<ul>

</HeaderTemplate>

<FooterTemplate>

</ul>

</FooterTemplate>

<ItemTemplate>

<asp:DataList ID="Repeater1" runat="server" DataSource='<%#
CType(Container.DataItem, SiteMapNode).ChildNodes %>'>

<ItemTemplate>

<li>

<asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl='<%# Eval("Url")
%>'><%# Eval("Title") %></asp:HyperLink>

</li>

</ItemTemplate>

</asp:DataList>

</ItemTemplate>

</asp:DataList>
Sep 8 '08 #1
0 657

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by V. Jenks | last post: by
6 posts views Thread by Paul | last post: by
1 post views Thread by Craig | last post: by
3 posts views Thread by Mirek Endys | last post: by
1 post views Thread by AJ | last post: by
3 posts views Thread by Crazy Cat | last post: by
reply views Thread by kermitthefrogpy | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.