Ability to reformat Visual Studio ASP.NET/HTML - does it exist?

Does Visual Studio have the ability or has a VS plug-in that will reformat the ASP.NET and HTML markup (i.e., do nice printing). In particular, I want it to put all properties or attributes in alphabetical order for each tag, perhaps with some exceptions that the user can specify, for example, in the configuration file. In addition, each property or attribute could be placed on a separate line, again in accordance with the user specification.

For example, consider the following:

<asp:TextBox ID="txtPlanStart" runat="server" ToolTip="start date" Columns="8">

Reformatted Version:

<asp:TextBox ID="txtPlanStart" runat="server" 
     Columns="8"
     ToolTip="start date" />

Please note that the reformatted version is not strictly in alphabetical order or on separate lines, because the identifier and runat are the first. Again, exceptions for reformatting can be specified by the user.

If this feature is not available integrated into VS, is there any other utility?

+3
source share
2 answers

I do not think that Visual Studio has this functionality, but the Resharper plugin has a contextual option. It will allow you to click on any tag and choose to reorder them in alphabetical order.

0
source

, CTRL + K + D ASP.NET HTML!

+6

Source: https://habr.com/ru/post/1756427/


All Articles