Suggestion needed on how to accomplish some Complex Databinding

Discussion in 'ASP .Net' started by ajitgoel, Apr 6, 2007.

  1. ajitgoel

    ajitgoel Guest


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

    1 2 3 <= Page
    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
    <asp:Label ID="lblSubSectionStep" runat="server"

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

    <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
    b. Adding TR, TD tags around the first and the second label controls.
    This makes the datalist render as

    Page 1 Title
    Page 1 Title
    Page 3 Title

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

    Kind Regards;

    Ajit Goel
    ajitgoel, Apr 6, 2007
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.