3

Possible Duplicates:
Send asp.net mvc action result inside email
Render a view as a string

I would like to obtain the result HTML from one of my controller actions, and simply send the result as a HTML format email. However, I am having difficulties trying to figure out how to obtain that HTML from ViewResult.

One approach I have tried is to implement HtmlEmailActionFilter that inherits from ActionFilterAttribute. But I still don't know how to get the HTML from ResultExecutedContext.

Am I on the right track? If not, what would be a better way to perform what I would like to accomplish?

Thanks.

Community
  • 1
  • 1
weilin8
  • 2,975
  • 3
  • 32
  • 36
  • 1
    possible duplicate http://stackoverflow.com/questions/520863/send-asp-net-mvc-action-result-inside-email/ – The Scrum Meister Dec 20 '10 at 05:59
  • actually, i don't think it is a duplicate. the OP is looking for a way to achieve this in an actionfilter, rather than in the action. i was just about to post the solution when the post was closed :) – jim tollan Dec 20 '10 at 13:38
  • 1
    @jim - I would love to see your solution. Is there a way to have this reopen so you can post your answer? – weilin8 Dec 20 '10 at 19:15
  • @jimtollan I'd really like to see your solution too. People are really heavy-handed with closing questions. I guess because you can get easy points. – Ev. Nov 18 '13 at 23:45
  • Ev - was way back *when*, but will see if I can recall what I was on the verge of answering, when the heavy hands dropped!! :-) – jim tollan Nov 19 '13 at 08:09

0 Answers0