AddScriptInclude

.AddScriptInclude()

Adds a script file to the list of includes for the ShareItLibrary.

Method

public static void AddScriptInclude(string script, HtmlHelper helper, bool noLibraryPath = false)
public static void AddScriptInclude(string[] script, HtmlHelper helper, bool noLibraryPath = false)
public static void AddScriptInclude(string script, dynamic viewBag, bool noLibraryPath = false)
string script

The name of the script file to add the header of the page.

string[] script

An array of script files to add the header of the page.

HtmlHelper helper

The current HtmlHelper context.

dynamic viewBag

The current HtmlHelper.ViewBag context.

bool noLibraryPath
Default: false

Choose not to use the ShareItLibrary default library path.

Example

C#
SiUtil.AddScriptInclude("MyScriptFile.js", helper);