?
Solved

REPEATER in design view inserts <TBODY> tag. How do I avoid this?

Posted on 2005-03-11
3
Medium Priority
?
353 Views
Last Modified: 2008-02-01
I have a Repeater embeded within a regular table and it starts off like this:

<table cellpadding="0" cellspacing="0" border="0">
    <tr>
        <td>
            <asp:Repeater id="rpItems" runat=server>
                <HeaderTemplate>
                   <table cellpadding="0" cellspacing="0" border="0">
                       <tr>
                           <td>Name</td>
                           <td>Email</td>
                       </tr>
                </HeaderTemplate>
                <ItemTemplate>
                       <tr>
                           <td><%# DataBinder.Eval(Container.DataItem,"NAME") %></td>
                           <td><%# DataBinder.Eval(Container.DataItem,"EMAIL") %></td>
                       </tr>
                </ItemTemplate>
                <FooterTemplate>
                     </table>
                </FooterTemplate>
            </asp:Repeater>
        </td>
    </tr>
</table>

I SWITCH TO DESIGN MODE and it ends up like this:

<table cellpadding="0" cellspacing="0" border="0">
<tbody>
    <tr>
        <td>
            <asp:Repeater id="rpItems" runat=server>
                <HeaderTemplate>
                   <table cellpadding="0" cellspacing="0" border="0">
                       <tr>
                           <td>Name</td>
                           <td>Email</td>
                       </tr>
                </HeaderTemplate>
                <ItemTemplate>
                       <tr>
                           <td><%# DataBinder.Eval(Container.DataItem,"NAME") %></td>
                           <td><%# DataBinder.Eval(Container.DataItem,"EMAIL") %></td>
                       </tr>
                </ItemTemplate>
                <FooterTemplate>
                     </table>
                </FooterTemplate>
            </asp:Repeater>
        </td>
    </tr></tbody></table>

The damage to the html is quite a bit more. Anybody know how to disable this or avoid it? Please help.
0
Comment
Question by:kriskhoury
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 33

Accepted Solution

by:
raterus earned 800 total points
ID: 13520045
That is just visual studio messing up your code, it is a bug that has quite a few developers p/o'd.  Microsoft hasn't provided a fix, so my only suggestion, and really the only thing you can do about it, is to hit "Ctrl-Z" as soon as you switch back to <html> view.  That will "undo" what VS.net just did to your html source.  I've learned just to avoid design view...
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

771 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