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



The information in this article applies to:

  • Microsoft ASP.NET (included with the .NET Framework 1.1)
  • Microsoft ASP.NET (included with the .NET Framework) 1.0

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.

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.

STATUS

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

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.

REFERENCES

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

Modification Type:MajorLast Reviewed:7/12/2003
Keywords:kbpending kbhtml kbWebForms kbbug KB821344 kbAudDeveloper