Thomas
Thomas

Reputation: 2466

Why is my DataList flow still outputting a table?

I am new to .net, and am tasked with customizing an eCommerce site that attaches to our SAP B1 server. The output of products is currently accomplished through a Datalist which creates output in a table. I have changed the RepeatLayout="Flow" in an effort to use a ul li structure instead of tables. Why is my output still coming in the form of tables?

Upvotes: 1

Views: 2334

Answers (1)

user843595
user843595

Reputation:

You can use either Table or Flow in .Net 2. Instruction is here.

Flow will render with span tag.

UnorderedList and OrderedList throws exception even in .Net 4.

However, you can use repeater control for your desired ul and li layout.

<asp:Repeater  ID="Repeater1" runat="server">
    <HeaderTemplate>
        <ul>
    </HeaderTemplate>
    <ItemTemplate>
        <li>
            <%# Eval("FirstName")%>
            <%# Eval("LastName")%></li></ItemTemplate>
    <FooterTemplate>
        </ul></FooterTemplate>
</asp:Repeater>

Upvotes: 4

Related Questions