RazorStringHostContainer<TBaseTemplate>.RenderTemplate

Call this method to actually render a template to the specified outputfile

public string RenderTemplate(string templateText,
	object model,
	TextWriter writer,
	bool inferModelType)

Return Value

rendering results or null on failure. If a writer is a passed string.Empty is returned or null for failure

Parameters

templateText
The template text to parse and render

model
Any object that will be available in the template as a dynamic of this.Context or if the type matches the template type this.Model.

writer
Optional textwriter that output is written to

inferModelType
If true infers the model type if no @model or @inherits tag is provided


See also:

Class RazorStringHostContainer

© West Wind Technologies, 2018 • Updated: 06/07/18
Comment or report problem with topic