Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

call a mvc action from jquery

$.ajax({
    // edit to add steve's suggestion.
    //url: "/ControllerName/ActionName",
    url: '<%= Url.Action("ActionName", "ControllerName") %>',
    success: function(data) {
         // parse your data here
         alert(data);
    }
});
 
PREVIOUS NEXT
Tagged: #call #mvc #action #jquery
ADD COMMENT
Topic
Name
7+7 =