Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How can I use a repeater to display 4 different images within one <tr></tr>?

Posted on 2005-03-24
5
Medium Priority
?
244 Views
Last Modified: 2010-04-16
What I want to do is to display 4 different images in each row of a table using a repeater.   If this can't be done with a repeater, I'm open to solutions using a different method.

This is the code that I have but it doesn't work...

<table>
    <asp:repeater id="rprImages" runat="server">
          <ItemTemplate>
      <tr bgcolor="#00ffcc">
          <td><img src='MakeThumbnail.aspx?FileName=images/<%# DataBinder.Eval Container.DataItem, "FileName")%>' border="0">
                    </td>
                   <td><img src='MakeThumbnail.aspx?FileName=images/<%# DataBinder.Eval Container.DataItem, "FileName")%>' border="0">
                    </td>
                    <td><img src='MakeThumbnail.aspx?FileName=images/<%# DataBinder.Eval Container.DataItem, "FileName")%>' border="0">
                    </td>
                    <td><img src='MakeThumbnail.aspx?FileName=images/<%# DataBinder.Eval Container.DataItem, "FileName")%>' border="0">
                    </td>                  
                </tr>
           </ItemTemplate>
     </asp:repeater>
</table>

All help would be greatly appreciated
0
Comment
Question by:MastaGardener
  • 2
  • 2
5 Comments
 
LVL 17

Expert Comment

by:Jesse Houwing
ID: 13624334
Unless you re-work your query to return 4 filenames per row this concept won't work.
0
 

Author Comment

by:MastaGardener
ID: 13627538
Okay...how can get 4 images in each row using a different concept?
0
 
LVL 23

Accepted Solution

by:
b1xml2 earned 2000 total points
ID: 13628325
<asp:DataList id="DataList1" runat="server" RepeatColumns="4">
<ItemTemplate><img src='MakeThumbnail.aspx?FileName=images/<%# DataBinder.Eval Container.DataItem, "FileName")%>' border="0"></ItemTemplate>
</asp:DataList>
0
 
LVL 23

Expert Comment

by:b1xml2
ID: 13628327
DataList is in-between DataGrid(most complex) and Repeater (least complex)
0
 

Author Comment

by:MastaGardener
ID: 13637183
Thanks a lot!
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Suggested Courses
Course of the Month13 days, 17 hours left to enroll

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question