jsreport / jsreport-dotnet-aspnetcore

Asp.net core and MVC support for jsreport c# sdk
MIT License
11 stars 8 forks source link

RenderViewToStringAsync with razor pages in Pages folder #7

Closed Andrioden closed 6 years ago

Andrioden commented 6 years ago

In all your examples you are rendering views in /Views folder, but new razor projects now store their razor pages in or /Pages (or /Area). How can I point to this? Is it possible?

string contentHtml = await _jsReportMVCService.RenderViewToStringAsync(HttpContext, RouteData, @"\Receipt", SomeObject);

Does not work when Receipt.cshtml is in /Pages Do work when Receipt.cshtml is in /Views

Andrioden commented 6 years ago

I tested some more, placing it in Pages/Shared/ works. Closing.