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 string RenderPartialViewToString(string viewPath,
	object model)

Return Value

String of the rendered view or null on error


The path to the view to render. Either in same controller, shared by name or as fully qualified ~/ path including extension

The model to pass to the viewRenderer

See also:

Class ViewRenderer

© West Wind Technologies, 1996-2016 • Updated: 12/12/15
Comment or report problem with topic