ScriptHelperGetScriptTag Method |
Builds an HTML script tag that can be used to include external script given its URL.
Allows to explicitly disable script minification.
Namespace: CMS.Base.Web.UIAssembly: CMS.Base.Web.UI (in CMS.Base.Web.UI.dll) Version: 12.0.0
Syntax public static string GetScriptTag(
string url,
bool minify = true,
ScriptExecutionModeEnum executionMode = ScriptExecutionModeEnum.Normal
)
Parameters
- url
- Type: SystemString
URL of the script file - minify (Optional)
- Type: SystemBoolean
True if minification should be used, otherwise false - executionMode (Optional)
- Type: CMS.Base.Web.UIScriptExecutionModeEnum
Specifies script's execution mode.
Return Value
Type:
StringScript tag that references external URL
See Also