How to show different layout in a Repeater?

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Quentin Huo (q.huo_at_manyworlds.com)
Date: 03/17/04


Date: Tue, 16 Mar 2004 18:36:28 -0600

Hi,

I used a Repeater to render a list, like the following:

<asp:Repeater ...>
    <ItemTemplate>

       <%# ((IDataRecord)Container.DataItem)["authorName"]%>
        <%# ((IDataRecord)Container.DataItem)["publisher"]%>

    </ItemTemplate>
</asp:Repeater>

But if an item in the list is a book, I need put the authorName first and
then Publisher. If an item in the list is an image, I need put the Publisher
first and authorName second. How can I do this?

Thanks

Q.


Quantcast