views:

85

answers:

2

Is there any way I can get the body of a Response object back before it's sent down to the browser?

I'd like to do something on Page_LoadComplete to get the current response of what's about to be written to the page so I can do something with it.

+2  A: 

Look at the Response.Filter property.

John Saunders
Ok, I see how it's used to modify it, usually it's an uppercase example. How can I get the main content into a string?
2GDave
I've never used it. What are you trying to accomplish? There may be a better way to do it.
John Saunders
I'm trying to get a pdf export of the page. I'm using abcpdf and it has the ability to accept a url, but when it loads the content it loses the context of the user that's logged in via forms authentication, so I'm trying to work around and see what I can come up with.
2GDave
Got it. I've got the user hitting the page I need, then using the filter to get the html, then I save that temp file and I can pass it to the pdf creator. Thanks for the effort and the direction to Filter.
2GDave
A: 

Fiddler is your friend.

Simon Chadwick