Suggestion needed on how to accomplish some Complex Databinding

A

ajitgoel

Hi;

I have a requirement which of showing a control like this:

1 2 3 <= Page
Number
Page 1 Title Page 2 Title Page 3 Title <= Page Name

Using a datalist control I have got it to something like this:

1 Page 1 Title 2 Page 1 Title 3 Page 3 Title

My data comes from a SiteMap control:

<asp:DataList runat="server" ID="dlMenu" RepeatDirection=Horizontal
DataSourceID=SiteMapDataSource4>
<ItemTemplate>
<asp:Label ID="lblSubSectionStep" runat="server"

<asp:Label ID="lblSubMenu" runat="server"
Text='<%# Eval("title")%>'/>
<%--</ItemTemplate>
</asp:DataList>
</ItemTemplate>
</asp:DataList>

<asp:SiteMapDataSource ID="SiteMapDataSource4"
runat="server" ShowStartingNode="False" StartingNodeOffset="2"/>

Here is what I have tried:

a. Putting a dataList inside the datalist does not work(.Net framework
complains about datasourceid cannot be changed when binding the child
datalist)
b. Adding TR, TD tags around the first and the second label controls.
This makes the datalist render as

1
Page 1 Title
2
Page 1 Title
3
Page 3 Title

Any ideas what I would need to do to fix this??

Kind Regards;

Ajit Goel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top