London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!

Class ClientResourceExtensions

Client resource rendering extensions

Inheritance
System.Object
ClientResourceExtensions
Namespace: EPiServer.Framework.Web.Mvc.Html
Assembly: EPiServer.Framework.AspNetCore.dll
Version: 12.0.3
Syntax
public static class ClientResourceExtensions : Object

Methods

Returns a CSS link tag.

Declaration
public static IHtmlContent CssLink(this IHtmlHelper html, string virtualPath)
Parameters
Type Name Description
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper html

The html helper to hook the helper on.

System.String virtualPath

The path to the css resource.

Returns
Type Description
Microsoft.AspNetCore.Html.IHtmlContent

A link html tag.

RequiredClientResources(IHtmlHelper, String)

Renders required client resources for specified area.

Declaration
public static IHtmlContent RequiredClientResources(this IHtmlHelper html, string renderingArea)
Parameters
Type Name Description
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper html

The HTML helper.

System.String renderingArea

The rendering area name to render required client resources for.

Returns
Type Description
Microsoft.AspNetCore.Html.IHtmlContent

ScriptResource(IHtmlHelper, String)

Returns a script tag.

Declaration
public static IHtmlContent ScriptResource(this IHtmlHelper html, string sourcePath)
Parameters
Type Name Description
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper html

The html helper to hook the helper on.

System.String sourcePath

The path to the script resource.

Returns
Type Description
Microsoft.AspNetCore.Html.IHtmlContent

A script html tag.