I am wondering if there is any tool for Tidy Html on the fly.
Currently, in my application, I use MasterPage, and then my views are loaded into the Masterpage. The problem is that <asp:content runat="server" ... /> always adds extra output spaces / lines to the HTML output.
What I really would like to do is clean it so that
<title> This is my title </title>
will look like
<title>This is my title</title>
Now I understand that I can go through and install
<asp:content ID="Content1" runat="server" ContentPlaceHolderID="TitleContent">This is my title</asp:content>
But it becomes a pain, because I often use Ctrl + k + d , which leads to unwanted reformatting.
Also, when I use inline code like
<asp:Content ID="indexTitle" ContentPlaceHolderID="TitleContent" runat="server">User <%: Model.UserName%> - Urban Now</asp:Content>
and use the "reformatting" keystrokes, then there are also line breaks before and after <%: Model.UserName%> , and there is no way to set this formatting to "Tools / Options / Formatting โ Specific tag parameters" (at least not that that I can find).
source share