tags:

views:

39

answers:

0

I'm wondering if there's any kind of tool out there to Tidy Html on the fly.

Currently in my app, I use a MasterPage and then my Views are loaded into the Masterpage. The problem is that the <asp:content runat="server" ... /> always adds additional whitespace/linebreaks in the output HTML.

What I'd really like to do is clean it up so that

<title>
    This is my title

</title>

will look like

<title>This is my title</title>

Now I realize that I can go through and set

<asp:content ID="Content1" runat="server" ContentPlaceHolderID="TitleContent">This is my title</asp:content>

But that becomes a pain because I often use Ctrl + k + d which results in the reformatting that is undesirable.

Moreover, 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" key strokes, then there are also line breaks before and after the <%: Model.UserName%> and there is no way to set that formatting in the "Tools/Options/Formatting --> Tag Specific Options" (at least not that I can find).