ScriptHelperRegisterScriptFile Method |
Registers the client script and adds a script file reference to the page.
Allows to explicitly disable script minification.
Namespace: CMS.Base.Web.UIAssembly: CMS.Base.Web.UI (in CMS.Base.Web.UI.dll) Version: 13.0.131
Syntax public static void RegisterScriptFile(
PageElement element,
string url,
bool minify = true,
ScriptExecutionModeEnum executionMode = ScriptExecutionModeEnum.Normal
)
Parameters
- element
- Type: CMS.Base.Web.UIPageElement
Page element - url
- Type: SystemString
The URL or name of the script file. If only name is provided, the file from ~/CMSScripts/ is taken. It is also possible to input URLs like "Controls/uniselector.js" to access subfolders. - minify (Optional)
- Type: SystemBoolean
True if minification should be used, otherwise false - executionMode (Optional)
- Type: CMS.Base.Web.UIScriptExecutionModeEnum
Specifies script's execution mode.
See Also