Repeater table repeating inside itself

I cannot figure out why my repeater eventually starts nesting table within table producing an outward effect on my page.  The first few rows for SearchResult looks fine but then about the 4th searchresult (parent repeater, I notice it's nesting itself inside the previous table.  The end result is a page that goes way to the right with tables nested inside tables which is not what I want.

    <tr>
        <td>
            <div class="VerticleSpacer"></div>
            <div class="main_body_content">
            <asp:Repeater ID="rptSearchStrings" Runat="server" OnItemDataBound="rptSearchStrings_ItemDataBound">
                <ItemTemplate>
                        <table width="600">
                            <tr>
                                <td class="PagerAlpha_LeftColumn" width="100px">
                                    <asp:HyperLink ID="hypSearchString" Text=<%#Eval("SearchString") %> runat="server" />          
                                </td>
                                <td>
                                    <table>
                                            <asp:Repeater ID="rptProducts" Runat="server" >
                                                <ItemTemplate>
                                                 <tr>
                                                        <td valign="top">
                                                            <img src="<%#WebUtil.ImageUrl(Convert.ToString(Eval("CatImage")), Context.Request.IsSecureConnection)%>" />
                                                        </td>
                                                        <td>
                                                            <%#ShortProductDescription(Convert.ToString(Eval("Description"))) %>
                                                        </td>
                                                 </tr>
                                                </ItemTemplate>                        
                                            </asp:Repeater>
                                    </table>
                                 </td>
                            </tr>
                            <tr><td colspan="2" class="horizontal_line"></td></tr>
                        </table>
                </ItemTemplate>
            </asp:Repeater>
            </div>      
        </td>
    </tr>
LVL 1
dba123Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Obadiah ChristopherCommented:
Try placing in headertemplate and footertemplate as below
<tr>
        <td>
            <div class="VerticleSpacer"></div>
            <div class="main_body_content">
            <asp:Repeater ID="rptSearchStrings" Runat="server" OnItemDataBound="rptSearchStrings_ItemDataBound">
<HeaderTemplate>
                        <table width="600">
                            <tr>
                                <td class="PagerAlpha_LeftColumn" width="100px">
                                    <asp:HyperLink ID="hypSearchString" Text=<%#Eval("SearchString") %> runat="server" />          
                                </td>
</HeaderTemplate>
                <ItemTemplate>
 
                                <td>
                                    <table>
                                            <asp:Repeater ID="rptProducts" Runat="server" >
                                                <ItemTemplate>
                                                 <tr>
                                                        <td valign="top">
                                                            <img src="<%#WebUtil.ImageUrl(Convert.ToString(Eval("CatImage")), Context.Request.IsSecureConnection)%>" />
                                                        </td>
                                                        <td>
                                                            <%#ShortProductDescription(Convert.ToString(Eval("Description"))) %>
                                                        </td>
                                                 </tr>
                                                </ItemTemplate>                        
                                            </asp:Repeater>
                                    </table>
                                 </td>
                            </tr>
                            
                </ItemTemplate>
<FooterTemplate>
<tr><td colspan="2" class="horizontal_line"></td></tr>
                        </table>
</FooterTemplate>
            </asp:Repeater>
            </div>      
        </td>
    </tr>

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.