문제

I've discovered a very nice tool for cleaning up a mess of HTML in a project I have inherited:

Basically, I can paste in my HTML, click the Tidy button, and it cleans everything up.

However, my project is an ASP.NET web site, and HTML Tidy does not know what an asp tag is.

Therefore, by default, it simply removes it.

Ouch! Suddenly, nothing works because I have no controls on my form.

Looking at the Help and going into Advanced features, I set the Output format to Side by Side Diff, which will display the asp tags, is something, but now the two halves do not appear to be very related.

Is there a way, using the web interface, that I can get HTML Tidy to output the items it does not understand?

If not, is there another tidy tool for ASP.NET pages that will not cut out all of my asp tags?

The closest question I found related to this was .NET version of HTML Tidy?, but there could be better answers that did not pull up in my search.

도움이 되었습니까?

해결책 2

I found the best editor is to just configure all of the very elaborate settings from within Visual Studio's HTML Text Editor Options.

VS2010 HTML Text Editor Options

다른 팁

Tidy assumes you want to output valid HTML, so it doesn't play nice with ASP.NET server side tags. If you're just looking for something to indent your html, try http://tools.arantius.com/tabifier.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top