| 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
Public Function RenderPartial(Of T As ViewModelBase) (
templatePath As String,
model As T
) As String
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:
StringOutput from rendering of the view model template
See Also