Html helper used to add scripts.
Methods
AddScript
(IHtmlHelper, WellKnownScripts) Method
AddScript (IHtmlHelper htmlHelper, WellKnownScripts script)
Add a well-known script.
AddScript
(IHtmlHelper, String) Method
AddScript (IHtmlHelper htmlHelper, String scriptPath)
Register the specified script to be added to the Layout or module's scripts. Use ~! for the currently executing view path, or ~# for the currently executing extension.
Examples
@Html.AddScript("~/Extensions/MyModule/MyModule.js")
AddScript
(IHtmlHelper, String, Boolean) Method
AddScript (IHtmlHelper htmlHelper, String scriptPath, Boolean isAsync)
Register the specified script to be added to the Layout or module's scripts. Use ~! for the currently executing view path, or ~# for the currently executing extension.
Examples
@Html.AddScript("~/Extensions/MyModule/MyModule.js")
AddScript
(IHtmlHelper, String, Boolean, Int32) Method
AddScript (IHtmlHelper htmlHelper, String scriptPath, Boolean isAsync, Int32 order)
Register the specified script to be added to the Layout or module's scripts. Use ~! for the currently executing view path, or ~# for the currently executing extension.
Examples
@Html.AddScript("~/Extensions/MyModule/MyModule.js")
AddScript
(IHtmlHelper, String, Boolean, Boolean) Method
AddScript (IHtmlHelper htmlHelper, String scriptPath, Boolean isAsync, Boolean isDynamic)
Register the specified script to be added to the Layout or module's scripts. Use ~! for the currently executing view path, or ~# for the currently executing extension.
Examples
@Html.AddScript("~/Extensions/MyModule/MyModule.js")
AddScript
(HttpContext, String, Boolean, Int32) Method
AddScript (HttpContext context, String scriptPath, Boolean isAsync, Int32 order)
Register the specified script to be added to the Layout or module's scripts.
AddScript
(HttpContext, String, Boolean, Boolean, Int32, String) Method
AddScript (HttpContext context, String scriptPath, Boolean isAsync, Boolean isDynamic, Int32 order, String version)
Register the specified script to be added to the Layout or module's scripts.
AddWellKnownScript
(IHtmlHelper, String) Method
AddWellKnownScript (IHtmlHelper htmlHelper, String script)
Register the specified script with defaults for well-known scripts, and without the async attribute.
AddWellKnownScript
(IHtmlHelper, String, Boolean) Method
AddWellKnownScript (IHtmlHelper htmlHelper, String script, Boolean isAsync)
Register the specified script with defaults for well-known scripts, and with the async attribute as specified by isAsync.
GetCallerVersion
(IHtmlHelper) Method
GetCallerVersion (IHtmlHelper htmlHelper)
Return the version of the assembly which contains the calling controller action.
GetCoreVersion
GetCoreVersion ()
Return the version of one of the Nucleus core assemblies.
RenderScripts
(IHtmlHelper) Method
RenderScripts (IHtmlHelper htmlHelper)
Adds the scripts submitted by AddScript to the layout. This method is intended for use by the Nucleus Core layout.