I am using Visual Studio 2010 and I am trying to enter some HTML by hand. I code the following lines:
<tr>
<td colspan="4" class="shade tableheader">NCR Information </td>
</tr>
<tr>
<td class="shade">Date Opened </td>
<td><asp:TextBox ID="fldReportDate" runat="server" CssClass="datePicker"></asp:TextBox> </td>
<td class="shade">NCR # </td>
<td style="font-weight: bold; font-size: 12pt"><asp:Label ID="fldLog" runat="server"></asp:Label></td>
</tr>
<tr>
<td class="shade">Closed Date </td>
<td><asp:TextBox ID="fldClosedDate" runat="server" CssClass="datePicker"></asp:TextBox></td>
<td align="left" class="shade">NCR Type* </td>
<td align="left"><asp:DropDownList ID="fldNCRType" runat="server" CssClass="required"></asp:DropDownList></td>
</tr>
I save the document and it converts my code to:
<tr>
<td colspan="4" class="shade tableheader">NCR Information </td></tr><tr>
<td class="shade">Date Opened </td><td>
<asp:TextBox ID="fldReportDate" runat="server" CssClass="datePicker"></asp:TextBox></td><td class="shade">NCR # </td><td style="font-weight: bold; font-size: 12pt">
<asp:Label ID="fldLog" runat="server"></asp:Label></td></tr><tr>
<td class="shade">Closed Date </td><td>
<asp:TextBox ID="fldClosedDate" runat="server" CssClass="datePicker"></asp:TextBox></td><td align="left" class="shade">NCR Type* </td><td align="left">
<asp:DropDownList ID="fldNCRType" runat="server" CssClass="required">
</asp:DropDownList>
</td>
</tr>
I then reformat the code, using the Visual Studio Reformat command, and I get:
<tr>
<td colspan="4" class="shade tableheader">NCR Information </td>
</tr>
<tr>
<td class="shade">Date Opened </td>
<td><asp:TextBox ID="fldReportDate" runat="server" CssClass="datePicker"></asp:TextBox></td>
<td class="shade">NCR # </td>
<td style="font-weight: bold; font-size: 12pt"><asp:Label ID="fldLog" runat="server"></asp:Label></td>
</tr>
<tr>
<td class="shade">Closed Date </td>
<td><asp:TextBox ID="fldClosedDate" runat="server" CssClass="datePicker"></asp:TextBox></td>
<td align="left" class="shade">NCR Type* </td>
<td align="left">
<asp:DropDownList ID="fldNCRType" runat="server" CssClass="required"></asp:DropDownList>
</td>
</tr>
When I manually format I get what is seen in the last code example (I am not worried about the extra returns as I can take care of this using tag formatting options.), but why, when I save does it pulls everything back together. I have </td>'s and <tr>'s mingling on the same same line, it is insanity.
I have looked at this blog entry and have put spaces all over my document before each tag, after each tag/element and it does not seem to help. Am I reading something wrong?