Share via


Controller.JavaScript(String) Method

Definition

Creates a JavaScriptResult object.

protected internal virtual System.Web.Mvc.JavaScriptResult JavaScript(string script);

Parameters

script
String

The JavaScript code to run on the client

Returns

The JavaScriptResult object that writes the script to the response.

Applies to