views:

63

answers:

3

Ive noticed when looking at the source of a page generated in ASP.NET, the actual markup is very messy - sort of a half-assed tabbed affair with bundles of whitespace thrown in (see pic).

alt text

Can anyone suggest a technique to remove/strip this whitespace?

+1  A: 

Here is a good article on how to override the page render method:

http://madskristensen.net/post/Remove-whitespace-from-your-ASPNET-page.aspx

Tom Gullen
A: 

At the risk of being voted down, why does it matter?

Andy Evans
I was wondering this but then I thought it probably could matter for debuging, makes it easier to read etc. Also some people think it looks more professional if you're having a website reviewed or something.
Tom Gullen
Its in the interest of everyone for the footprint of the page being served to be as small as possible.
maxp
+1  A: 

You can do it without incurring any runtime cost

OmariO