Hello Ricardo,
I think what you want is to intercept the response content of all the pages
in your ASP.NET web appliation and do some customization on the response
content(removing the whitespaces),correct?
Based on my experience, generally to intercept the page's response content
and customize it, we mostly override individual page's Render method.
However, if you want to intercept the response of all the pages in the web
application, I think you can consider using the response Filter of the
HttpResponse. The HttpResponse class provide a "Filter" property which
allow us to chain a wrapper Stream object to the HttpResponse's Stream,
thus we can use this custom stream object to intercept the response's
content and do some simple customization. Here is an article describing
this:
#Producing XHTML-Compliant Pages With Response Filters
http://www.aspnetresources.com/artic...tpFilters.aspx
BTW, in order to apply this filter(custom stream) onto all the page
response, you can use Global.asax event or use a custom httpmodule to
install the filter on each page response object. (also mentioned in the
above article).
Hope this helps.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.