I want to tie in to MVC to trigger some code to run whenever the View is finished processing but not yet finished sending data to the browser.
views:
17answers:
1
+1
A:
I would say Controller.OnResultExecuted, but actually I think at this time data is already written to the output stream. The fact that view directly writes data to output stream may make answer to your question hard to find. The only way I think to avoid this is to write your own ViewResult that will provide intermediate stream to view engine, get all data into there, do your own processing, and then write it to the http output stream.
queen3
2010-04-22 19:24:18
No I think this will be exactly what I need. Although you are right about HTML being pumped to the browser to the output stream, but I tested that the output stream is not closed yet by the time OnResultExecuted is raised, which is exactly what I need. thanks.
Roberto Sebestyen
2010-04-22 19:29:52