Renders a full MVC view to a writer. Will render with the full MVC View engine including running _ViewStart and merging into _Layout
public void RenderView(string viewPath, object model, TextWriter writer)
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 render the view with
writer
Overloads:
public static string RenderView(string viewPath, object model, ControllerContext controllerContext)
public static void RenderView(string viewPath, TextWriter writer, object model, ControllerContext controllerContext)
public static string RenderView(string viewPath, object model, ControllerContext controllerContext, ref string errorMessage)
public static void RenderView(string viewPath, object model, TextWriter writer, ControllerContext controllerContext, ref string errorMessage)
See also:
Class ViewRenderer© West Wind Technologies, 1996-2016 • Updated: 12/12/15
Comment or report problem with topic