Anyone have any examples of javascript actionresults? I am having a hard time getting the script to execute once it has been returned. Thanks
The only way I have found to return a JavascriptResult and execute it on the client is with JQuery:
Use Ajax to get and then run a JavaScript
In the controller:
public JavaScriptResult ShowAlert() { var script = "alert('Hello');"; return new JavaScriptResult() { Script = script }; }