What I am trying to achieve:
After each view has finished executing I would like to make a separate http call to an external partner.
I need to pass one of the view's content as body of that http call.
What I have so far:
I have a base controller from which all of my controllers inherit from.
I have found that i can override the onActionExecuted() method of the base controller and write my partner http call code there so that it will be executed after each action.
I have written a custom result after reading the article at Send asp.net mvc action result inside email. which enables me to grab the content of the view. (which is part of another controller that also inherits from base controller).
What I can't figure out:
- How do I make a call to the controller action (the one that will render the content for the http calls body) to get the content in my base controller onActionExecuted() method?
anil