AddScriptInline

.AddScriptInline()

Adds inline script to the list for output on the page for the ShareItLibrary.

Method

public static void AddScriptInline(string script, HtmlHelper helper)
public static void AddScriptInline(string script, dynamic viewBag)
public static void AddScriptInline(List<string> script, HtmlHelper helper)
public static void AddScriptInline(List<string> script, dynamic viewBag)
public static void AddScriptInline(string[] script, HtmlHelper helper)
public static void AddScriptInline(string[] script, dynamic viewBag)
string script

The script to add the bottom of the page.

List<string> script

A List of script lines to add the bottom of the page.

string[] script

An array of script lines to add the bottom of the page.

HtmlHelper helper

The current HtmlHelper context.

dynamic viewBag

The current HtmlHelper.ViewBag context.

Example

C#
SiUtil.AddScriptInline("<script language=\"javascript\" type=\"text/javascript\">", viewBag);
SiUtil.AddScriptInline(inlineScript, viewBag);
SiUtil.AddScriptInline("</script>", viewBag);