Skip to content

danushkap/razorview-to-string

Repository files navigation

Render Razor view to string

Azure DevOps builds CodeFactor

GitHub license GitHub issues

This POC demonstrates how to render (convert) a Razor view to a string in/using ASP.NET Core.

The actual render operation is done in the RazorViewToString Class-library project.

And how its used in a:

  • Non-web scenario - is illustrated in RazorViewToString.InNonWeb Console project
  • Web scenario - is illustrated in RazorViewToString.InWeb ASP.NET MVC project