Formatting of aspx files broken?

Endasil 16 Reputation points
2023-01-17T10:50:30.5766667+00:00
Using Visual Studio 2022 17.4.4 When formatting aspx files with visual studio, it puts the { at the "f" in "if" instead of under the i and the placement of } seem to be just random. How do I make make it align the {} with the if?

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <%MyClass myclass = ViewData["myclass"] as MyClass;%>
    <%string customMessage = ViewData["message"] as string;%>

    <% if (myclass != null)
        { %>
    <h2><%= myclass.Name %></h2>

    <% if (customMessage != null)
        { %>
    <h4><%=customMessage %></h4>
    <%} %>

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,246 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,579 questions
{count} votes