Lets say I have two controllers and two actions.
Controller - > AController Action -> MethodA()
.
Controller - > BController Action -> MethodB()
Both of these return xml data by a View(typedObject).
I want to add base 64 encoding be开发者_运维技巧fore returning this output to the client. On MethodA and MethodB. And there might be some other methods that should be included in this encoding aswell.
Would there be any good way of accomplish an behavoir / treatment of the action result ?
Would it be best to add a custom Action Result for this ?
You could decorate your action with an action filter
精彩评论