In regular asp.net, you can override Render () and provide your own HtmlWriter to intercept the displayed html before copying it to the HtmlWriter that was passed.
I donβt know how you would capture this in MVC, but Iβm sure that you can do it, especially if you create a new HttpModule as a preprocessor, post processes the output stream.
source share