Render a Razor Page to string
问题 Problem: I need to render a Razor Page partial to a string. Why I want this: I want to create a controller action that responds with JSON containing a partial view and other optional parameters. Attempts: I am familiar with the following example that renders a View to a string: https://github.com/aspnet/Entropy/blob/dev/samples/Mvc.RenderViewToString/RazorViewToStringRenderer.cs However, it is not compatible with Pages, as it only searches in the Views directory, so even if I give it an