Controller.JavaScript(String) Method

Definition

Creates a JavaScriptResult object.

protected internal virtual System.Web.Mvc.JavaScriptResult JavaScript (string script);
abstract member JavaScript : string -> System.Web.Mvc.JavaScriptResult
override this.JavaScript : string -> System.Web.Mvc.JavaScriptResult
Protected Friend Overridable Function JavaScript (script As String) As JavaScriptResult

Parameters

script
String

The JavaScript code to run on the client

Returns

The JavaScriptResult object that writes the script to the response.

Applies to