PC Review


Reply
Thread Tools Rate Thread

DataList and dataSource issues

 
 
Andy B
Guest
Posts: n/a
 
      8th Sep 2008
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.

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

<HeaderTemplate>

<ul>

</HeaderTemplate>

<FooterTemplate>

</ul>

</FooterTemplate>

<ItemTemplate>

<aspataList 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>

</aspataList>

</ItemTemplate>

</aspataList>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
about datalist and access datasource miladhatam@gmail.com Microsoft ASP .NET 1 28th Sep 2008 08:47 PM
Pass Parameter to DataList Datasource! =?Utf-8?B?QUo=?= Microsoft ASP .NET 1 24th Jul 2006 05:04 PM
DataSource Problem for Nested DataList scottls Microsoft ASP .NET 2 10th May 2006 08:36 PM
Datalist DataSource Error Will Chamberlain Microsoft C# .NET 1 5th Dec 2005 02:08 PM
Datalist DataSource Error Will Chamberlain Microsoft ASP .NET 2 1st Dec 2005 10:03 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:51 AM.