Click or drag to resize

WebExtensionsRenderResource(HtmlHelper, String, Type, Object) Method

Renders a Razor view from an embedded resource.

Namespace: GSF.Web
Assembly: GSF.Web (in GSF.Web.dll) Version: 2.4.207-beta
Syntax
public static MvcHtmlString RenderResource(
	this HtmlHelper helper,
	string resourceName,
	Type modelType = null,
	Object model = null
)
View Source

Parameters

helper  HtmlHelper
MVC HTML helper instance.
resourceName  String
Embedded resource name.
modelType  Type  (Optional)
Type of model.
model  Object  (Optional)
Model instance.

Return Value

MvcHtmlString
Rendered resource as an MvcHtmlString.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type HtmlHelper. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Remarks
If needed by view, define ViewBag.DataContext before rendering resource.
See Also