ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,246 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
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>
<%} %>