View view as string in MVC 6

After a long search for a solution to this problem, I found MVC5 and outdated solutions.

Now that we are in asp.net 5 beta 7, is there a way to visualize the representation of a string variable?

I need to display a view to show it in a javascript bootbox control (e.g. modal windows).

MVC 5 solutions do not work in version 6 because there is no ViewEngine class. Take a look:

enter image description here

and even the Razor object cannot be found:

enter image description here

+4
source share
1 answer

You can use this approach (see RenderPartialViewToString): fooobar.com/questions/264648 / ...

+4

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


All Articles