HTML with Visual Studio.NET

Generally, Microsoft’s Visual Studio.NET is a pleasure to work with. However, there is one area where it falls down really badly, and that’s as an HTML editor. ASP.NET is brilliant, web controls are great, and VS.NET is just swell at writing the code that sits behind a web app. But does it allow you to produce nicely formatted, standards-compliant HTML? Does it hell.

Spend ages getting all the tags on a page nicely indented and WATCH with TERROR as it reformats the page with bizarre line breaks and random spacing.

Get your markup ready for validation, then WEEP in AGONY as all your hand-crafted XHTML is turned into puddles of steaming donkey vomit.

We’re talking horror of Lovecraftian proportions here, folks. <span class="label">Great Cthulhu<span>? Surely you meant to say <SPAN class=label>Great Cthulhu<SPAN>. Here, let me correct that for you….

I don’t mind that it’s doesn’t produce valid XHTML by default. I do mind that it won’t let me write markup the way I want to. Hidden deep in the guts of Visual Studio’s configuration settings there is a “Stop Fucking With My Code” option, but apparently it’s only there for decorative purposes.


Earlier this week Scott Guthrie, the lead architect/product manager for ASP.NET, made some interesting accouncements on his blog about XHTML and accessibility standards compliance in ASP.NET 2 and the next version of Visual Studio (“Whidbey”). A white paper on goes into some more details about these, and other features. Here’s one of the bits I really like:

HTML Source Preservation

Visual Studio “Whidbey” respects your HTML. The formatting of your HTML markup — including all white space, casing, indention, carriage returns, and word wrapping — is now preserved exactly as originally written, even when switching back and forth between the design view and source view of the page. You can completely trust Visual Studio “Whidbey” to never modify your markup.

Yay! There’s a lot more cool stuff coming in ASP.NET 2, too. Unfortunately there’s still a long time to wait….

2 Replies to “HTML with Visual Studio.NET”

  1. Well I have no sympathy for you, ASP is the spawn of satan and so you deserve to suffer if you use it!


  2. I tend to disagree on the statement that VS isn’t generally the spawn of Lucifer! Read my blog, all about the pains of Visual Studio and other horrible MS products.

    I hate MS!

Comments are closed.