I want to extend the WebFormViewEngine so that I can perform some post-processing – I want it to do it’s stuff, then hand me the Html back, so I can do put some final touches to it. It needs to be done as a View/ViewEngine because I need access to the ViewData.
Unfortunately there seems to be no way to get the Html back from the WebFormView, and no way to hand a custom HtmlTextWriter to the WebFormView or ViewPage.
Surely there’s a way to do this? No?
Littlecharva
You can use Action Filters to do this. Check out this tutorial at asp.net/mvc. You want to use a ResultsFilter.
As an alternate, you can override the virtual OnResultExecuted method of the Controller.