How to visualize a view from a service level?

I enable a feature in my web application that notifies the user by email.

Now that I want the HTML format of this email, I wonder if it is possible to reuse the basic functions of ASP.NET MVC and have a partial view displayed in a string so that I can make a partial view with the contents of the email. Service level code will provide the model needed for presentation.

+3
source share
3 answers

Postal these days for this.

Send Postal to NuGet .

-1
source

You can call the method RenderView.

, ViewContext, , , ControllerContext. , ControllerContext .

+1

Source: https://habr.com/ru/post/1720277/


All Articles