Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

BUG: When You Resize an HTML Table Control, the HTML Editor Does Not Add the </tbody> Tag with the <tbody> Tag


View products that this article applies to.

Symptoms

When you resize the HTML table in Design view of Visual Studio .NET, and the table has the THEAD element and the TFOOT element, the HTML editor inserts the <tbody> tag in the table automatically. However, the editor does not add the corresponding </tbody> tag.

↑ Back to the top


Workaround

To work around this problem, make sure that you add the <tbody> tag manually when the <tbody> tag is added automatically to the table in the HTML file. You must add these tags in pairs to avoid creating a malformed HTML file.

↑ Back to the top


Status

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

↑ Back to the top


More information

Steps to Reproduce the Behavior

  1. Start Microsoft Visual Studio .NET.
  2. Create a new ASP.NET Web Application project in the following location: http://localhost/TestTable. By default, WebForm1.aspx is created.
  3. Drag a TABLE control from the HTML tab in the toolbox to WebForm1.
  4. In Design view, right-click WebForm1.aspx, and then click View HTML Source.
  5. In WebForm1.aspx, add the THEAD element and the TFOOT element to the table.
  6. Paste the following sample code to complete the code of WebForm1.aspx:
    <%@ Page%>
    <HTML>
       <HEAD>
          <title>WebForm1</title>
          <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
       </HEAD>
       <body MS_POSITIONING="GridLayout">
          <form id="WebForm1" method="post" runat="server">
             <TABLE id="Table1" style="Z-INDEX: 101; LEFT: 57px; WIDTH: 292px; POSITION: absolute; TOP: 216px; HEIGHT: 91px" cellSpacing="1" cellPadding="1" width="292" border="1">
                <THEAD>
                   <TR>
                      <TD>Table Head</TD>
                   </TR>
                </THEAD>
                   <TR>
                      <TD></TD>
                   </TR>
                 <TFOOT>
                      <TR>
                         <TD>Table Footer</TD>
                      </TR>
                 </TFOOT>
             </TABLE>
          </form>
       </body>
    </HTML>
  7. In HTML view, right-click WebForm1.aspx, and then click View Design.
  8. Make sure that the table header and the table footer appear correctly.
  9. Drag the lower right corner of the TABLE control to resize the table.
  10. In Design view, right-click WebForm1.aspx, and then click View HTML Source.

  11. Notice that the HTML editor has added the <tbody> tag automatically. However, the HTML editor has not added the corresponding </tbody> tag to the code.

↑ Back to the top


References

For more information about the HtmlTable control, visit the following Microsoft Web site:

↑ Back to the top


Keywords: KB821344, kbbug, kbwebforms, kbhtml, kbpending

↑ Back to the top

Article Info
Article ID : 821344
Revision : 5
Created on : 5/16/2007
Published on : 5/16/2007
Exists online : False
Views : 348