Monday, May 26, 2008

Automatic Formatting of Markup (HTML) in ASP.NET

Daniel at dimebrain did a really fantastic work writing a plug-in for VS that can format the markup in asp.net. When you build a web page using the VS designer, it auto generates the markup. But the auto generated code so clustered and impossibly hard to read.  You have to manually format the markup (HTML) code by hand. This is always very tiresome and boring job. Also this is wastage of time.

Daniel also felt the same. After being inspired by the Joe Stagner, he developed this plug-in. It provides an additional Edit menu item and hotkey (Ctrl+K, Ctrl+Z) to automatically line up attributes in a selection of text, or format the entire document if no text is selected. The meat of the add-in is a handful of regular expressions that parse tags (XAML, HTML, and ASP.NET directives) and a few IDE tools to line them up according to their indent level.

Download Links:

Screen Shots:

Related Posts

There was an error in this gadget