In a plain .asp file, any content outside of <% %>
tags is sent directly to the output buffer. Additionally, an expression in <%= %>
tags is evaluated and sent to the output buffer.
I want to redirect it so that, in some context that I establish, the result of those two constructs is instead sent to a buffer that I control. If possible, I'd like to be able to do this dynamically, so that I can redirect the output to different buffers at runtime.
The problem is open-ended, largely because I'll be planning what I'm building around this solution. I could use any way that exists to capture this output. Performance and ease of use are not major considerations.
This is a sequel to this question, in which I try one possible solution that turns out to not work.