Click or drag to resize

ViewModelTemplateTViewModelRenderPartialT Method (String, T)

Renders a partial view using the given view model

Namespace:  Dynamicweb.Rendering
Assembly:  Dynamicweb (in Dynamicweb.dll) Version: 9.10.0
Syntax
public string RenderPartial<T>(
	string templatePath,
	T model
)
where T : ViewModelBase

Parameters

templatePath
Type: SystemString
Relative path to a view model template, e.g. "partials/part.cshtml
model
Type: T
Instance of a view model

Type Parameters

T
The type of viewmodel. The type must inherit from Dynamicweb.Rendering.ViewModelBase

Return Value

Type: String
Output from rendering of the view model template
See Also