首页 > 解决方案 > VS2017 中是否有内置方法来清理我的代码中的选项卡?

问题描述

当我在 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>

标签: visual-studio-2017

解决方案


要么去:

编辑 > 高级 > 格式化文档

或者默认快捷键是 Ctrl + E,D


推荐阅读