Controller::JavaScript Method (String^)
Creates a JavaScriptResult object.
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
Parameters
- script
-
Type:
System::String^
The JavaScript code to run on the client
Return Value
Type: System.Web.Mvc::JavaScriptResult^The JavaScriptResult object that writes the script to the response.
This method is used to send JavaScript code that is created on the server to the client. The JavaScript is automatically run on the client. The result object that is prepared by this method is written to the response by the ASP.NET MVC framework when the object is executed.
Show: