Renders a partial MVC view to string. Use this method to render a partial view that doesn't merge with _Layout and doesn't fire _ViewStart.
public static string RenderPartialView(string viewPath,
object model,
ControllerContext controllerContext,
ref string errorMessage);
Return Value
String of the rendered view or null on error
Parameters
viewPath
The path to the view to render. Either in same controller, shared by
name or as fully qualified ~/ path including extension
model
The model to pass to the viewRenderer
controllerContext
Active controller context
errorMessage
optional output parameter to receive an error message on failure
Overloads:
See also:
Class ViewRenderer