Visual Studio .NET editor malforms HTML tags (316946)
The information in this article applies to:
- Microsoft Visual Studio .NET (2002), Professional Edition
- Microsoft Visual Studio .NET (2002), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2002), Enterprise Developer Edition
- Microsoft Visual Studio .NET (2002), Academic Edition
- Microsoft Visual Studio .NET (2003), Professional Edition
- Microsoft Visual Studio .NET (2003), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2003), Enterprise Developer Edition
- Microsoft Visual Studio .NET (2003), Academic Edition
- Microsoft ASP.NET (included with the .NET Framework)
This article was previously published under Q316946 SYMPTOMSIn Microsoft Visual Studio .NET, you may receive a parser error under the following
circumstances: - You use a Hypertext Markup Language (HTML)
element.
- You do not include a space between the end tag (/>) and
the value of the last attribute that is located inside a <FORM> tag on a
Web form in Microsoft Visual Studio .NET.
- You open the page in your browser.
Under these circumstances, you may receive the following parser
error: Unexpected end of file looking for <FORM>
tag. This problem occurs with other HTML elements such as <A>,
<LABEL>, < B >, <TEXTAREA>, and others. However, this issue
was resolved for certain tags such as the <DIV> and <SPAN> tags
starting with Microsoft Visual Studio .NET 2003. CAUSE When you switch between design view and HTML view, the
Visual Studio .NET editor changes the code in your Web form, which malforms the
tags. This problem only occurs when you do not include a space between the end
tag (/>) and the value of last attribute of the tag.RESOLUTION To work around this problem, modify the tag as follows:
<FORM id="myform" method="post" runat="server">
<SPAN id="MySpan" runat="server"></SPAN>
</FORM> - or -
<FORM id="myform" method="post" runat="server">
<SPAN id="MySpan" runat="server" />
</FORM> Notice that the second code sample includes a space before the end tag
(/>). STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.
Modification Type: | Major | Last Reviewed: | 8/29/2005 |
---|
Keywords: | kbvs2002sp1sweep kbbug kbDesigner kbGrpDSASP kbhtml kbIDEProject kbpending kbWebForms KB316946 kbAudDeveloper |
---|
|