In the VS IDE, I will format my code all nice and neat (in other words readable) when I am coding a ASPX page in HTML mode. I will switch to DESIGN mode or run the project and when I come back to HTML mode, my code is ALL messed up and once again un-readable.
HOW CAN I STOP THIS??? You have to be able to format your code to be able to read it, right?
An example is below:
MY FORMATTING- NICE - NEAT - READABLE
<tr>
<td class="headtxt" align="right">Address:</td>
<td>
<asp:textbox
id="txt_BillingAddress"
runat="server"
tabIndex="5"
BorderStyle="Inset"
CssClass="mdtxt"
ToolTip="Please enter billing address"
MaxLength="100"
Columns="50">
</asp:textbox>
<asp:RequiredFieldValidator
id="req_BillingAddress"
tabIndex="6"
runat="server"
BorderStyle="None"
ErrorMessage="Billing Address is required!"
ControlToValidate="txt_BillingAddress">
</asp:RequiredFieldValidator>
</td>
</tr>
VISUAL STUDIO TURNS IT INTO THIS
<tr>
<td class="headtxt" align="right">Address:</td>
<td><asp:textbox id="txt_BillingAddress" runat="server" tabIndex="5" BorderStyle="Inset" CssClass="mdtxt"
ToolTip="Please enter billing address" MaxLength="100" Columns="50"></asp:textbox>
<asp:RequiredFieldValidator id="req_BillingAddress" tabIndex="6" runat="server" BorderStyle="None" ErrorMessage="Billing Address is required!"
ControlToValidate="txt_BillingAddress"></asp:RequiredFieldValidator></td>
</tr>
PLEASE tell me this is a way to prevent this. Thanks in advance!!