HtmlScriptExtensions class

namespace: Serenity.Web   assemblySerenity.Net.Web

Contains Serenity related helper methods that can be used in Razor CSHTML files

public static class HtmlScriptExtensions

Public Members

name description
static GetLocalTextContent(…) Gets the text content of a local text script
static GetLocalTextInclude(…) Gets the script URL for a local text script
static LocalTextScript(…) Gets a script element for including a local text script
static ResolveWithHash(…) Resolves a content URL by adding its hash with "?v=" prefix.
static Script(…) Renders a script include element. If bundling is enabled, it may contain the bundle URL instead of the script URL. If the bundle containing the script file is already rendered in this context, it will return an empty string.
static ScriptBundle(…) Renders individual script elements for all JS files in a bundle if bundling is disabled, and renders a single script element containing the bundle URL if it is enabled.
static StyleBundle(…) Renders individual link elements for all CSS files in a bundle if bundling is disabled, and renders a single link element containing the bundle URL if it is enabled.
static Stylesheet(…) Renders a CSS stylesheet link element. If bundling is enabled, it may contain the bundle URL instead of the CSS URL. If the bundle containing the CSS file is already rendered in this context, it will return an empty string.

See Also