Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
|
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 11th, 2007, 11:08 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default repeater repeating in horizontal (data in 2 colums

hi guys...

I need to build a repeater that display data in two columns...

I'm doing something like the above
Code:
                <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlOtrasFotos">
                    <ItemTemplate>
                        <tr>
                            <td width="50%" style="text-align:center ">
                                <asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("URLImagen") %>' Height="190px"
                                    Width="284px" />
                                <%# Eval("Descripcion") %>
                            </td>
                    </ItemTemplate>
                    <AlternatingItemTemplate>
                        <td width="50%" style="text-align:center ">
                            <asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("URLImagen") %>' Height="190px"
                                Width="284px" />
                            <%# Eval("Descripcion") %>
                        </td>
                        </tr>
                    </AlternatingItemTemplate>
                    <HeaderTemplate>
                        <table style="border-collapse: collapse">
                    </HeaderTemplate>
                    <FooterTemplate>
                        </table>
                    </FooterTemplate>
                </asp:Repeater>
the problem with this is if the number of images are not odd then the alternatingitemtemplate will not render the last </tr>...

Actually this thing work on explorer and firefox, but if someone has a better way to do this I have my ears opens...

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========





Similar Threads
Thread Thread Starter Forum Replies Last Post
how to Distinct two colums but select other colums ALPEN07 SQL Server 2005 2 April 5th, 2008 06:08 AM
repeating data ph0neman Classic ASP Basics 5 January 18th, 2008 12:34 PM
Gridview/repeating data Mogg-Way ASP.NET 2.0 Basics 15 July 18th, 2007 02:53 PM
Getting data out of a repeater ethertt77 ASP.NET 2.0 Basics 0 February 20th, 2006 09:37 PM
Repeater, repeating empty cells brettdalldorf ASP.NET 1.0 and 1.1 Basics 0 June 16th, 2005 12:01 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.