Vincenzo Chianese has not received any gifts yet
Vincenzo Chianese posted a blog postSuppose we have a very simple action method: it takes no parameters and just returns a string:
public string MyTestMethod() { return "Test String"; }
What if we would like to call this action method from javascript through Ajax and to display the value it returns?
We can do it with jQuery:
function AjaxDisplayString() { $.ajax({ url: @Url.Action("MyTestMethod"), method: 'GET', success: function(data) { alert(data); } });… Continue Posted on August 12, 2012 at 11:41pm
© 2013 Created by Nicolò Borghi.
Powered by
Comment Wall (1 comment)
You need to be a member of Silicon Valley Study Tour to add comments!
Join Silicon Valley Study Tour
welcome!