开发者

Get the result HTML from ViewResult [duplicate]

开发者 https://www.devze.com 2023-01-31 04:47 出处:网络
This question already has answers here: Closed 12 years ago. Possible Duplicates: Send asp.net mvc action result inside email
This question already has answers here: Closed 12 years ago.

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 ha开发者_C百科ving 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消