问题描述
当我在ASP中设计页面时,复制和粘贴,添加代码以及移动代码会使标签对齐混乱。我想知道VS2017是否有内置的方式来清理选项卡并使所有内容对齐各自的适当级别。
之前:
<asp:DropDownList ID="DropDownList17" runat="server" Width="120px"></asp:DropDownList>
</td>
<td>
<asp:DropDownList ID="DropDownList20" runat="server" Width="120px"></asp:DropDownList>
</td>
<td>
<asp:DropDownList ID="DropDownList21" runat="server" Width="120px"></asp:DropDownList>
</td>
<td>
<asp:DropDownList ID="DropDownList22" runat="server" Width="120px"></asp:DropDownList>
</td>
</tr>
<tr>
之后:
<asp:DropDownList ID="DropDownList17" runat="server" Width="120px"></asp:DropDownList>
</td>
<td>
<asp:DropDownList ID="DropDownList20" runat="server" Width="120px"></asp:DropDownList>
</td>
<td>
<asp:DropDownList ID="DropDownList21" runat="server" Width="120px"></asp:DropDownList>
</td>
<td>
<asp:DropDownList ID="DropDownList22" runat="server" Width="120px"></asp:DropDownList>
</td>
</tr>
解决方法
要么转到:
编辑>高级>设置文档格式
或者默认快捷键是Ctrl + E,D