I want to know if it is possible to write to a log/text file dynamically generated HTML in asp.net tags in an .aspx page using HTTP modules.
By dynamically generated HTML, I mean the html content that asp.net generates in response to statements between the tags <% %> or <%# %> or <%$ %>.
So when asp.net renders a page, it essentially converts everything into HTML. There is some static html written in the asp.net page, rest is what i call dynamically genrated HTML. My goal is to dump somewhere all the dynamically generated HTML content. Can it be done using HTTP Modules or any other mechanism ?
Example:
If the .aspx page is like this
...
<td>Total Credit Line </td>
<td><%=creditLimit.ToString("C")%></td>
...
I want the HTTP Module to write in a log file, the HTML rendered by the <%=creditLimit.ToString("C")%> asp tag and all other asp tags on the page. The HTTP Module would be generic and can be added to any IIS website.
Note that there would be no difference in the output that is seen by a browser.