datalist and separatorTemplate

M

massimop

Hi to all,
I use a datalist, that should return a table with 3 columns.

The cell of the first column is used to show an image .
The cell of the second colun is used to show a * (separator) .
The cell of the third column is used to show an image .

Here the code:

< asp:DataList id="DataList1" runat="server" RepeatColumns="2"
RepeatDirection="Horizontal" BorderColor="blue" BorderWidth=1 >
< ItemStyle Width="90">< / ItemStyle >
< SeparatorStyle Wrap="False" Width="27" >< / SeparatorStyle>
< ItemTemplate>
<img src="/images/< % # DataBinder.Eval(Container.DataItem, "Name") % >">
</ ItemTemplate >
< SeparatorTemplate >*< / SeparatorTemplate>
< / asp:DataList >

The problem is, that the datalist returns a table with 4 columns.

Wrong table with 4 colums:

Img1 * Img2 *

Img3 * Img4 *

Img5 * Img6



Right table with 3 columns:

Img1 * Img2

Img3 * Img4

Img5 * Img6


How can I set the datalist, so I can see a table with 3 columns?
Any suggestions?

Thanks,
Massimo
 

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

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top