ASP.net MVC returning JSONP
Here is a simple solution, if you don’t want to define an action filter Client side code using jQuery: $.ajax(“http://www.myserver.com/Home/JsonpCall”, { dataType: “jsonp” }).done(function (result) {}); MVC controller action. Returns content result with JavaScript code executing callback function provided with query string. Also sets JavaScript MIME type for response. public ContentResult JsonpCall(string callback) { return … Read more