mvc render partial view without httpContext or controller context

asp.net, asp.net-mvc, asp.net-mvc-3, asp.net-mvc-4, razor

Solution

You can try the Razor Generator Visual Studio Extension. Basically you run the custom tool on your view and it will generate a class that you can pass a model into and it will generate a string.

Problem

Is it possible to render partial view without ViewContext or ControllerContext? - I'm trying to get PartialView Html as string from outside of Controller Action. - OR - Is it possible to call Controller Action from another method? (this will allow me to execute controller action and get partial view html this way).

Original source