Search
 
SCRIPT & CODE EXAMPLE
 

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);
    }
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: how to remove sub array null index in javascript 
Javascript :: javascript particles js not working 
Javascript :: lodash swap array elements 
Javascript :: remove comma from end of string javascript 
Javascript :: reload datatable without ajax 
Javascript :: react native password 
Javascript :: vue loop 
Javascript :: class function 
Javascript :: find max and min value in array javascript 
Javascript :: js log stack trace 
Javascript :: react native navigation nested 
Javascript :: hourglasses js 
Javascript :: truncate string in javascript 
Javascript :: how to find the sum of array using JavaScript 
Javascript :: how to get the current time of a audio in js 
Javascript :: next.js index page 
Javascript :: convert camelCase letter to Sentence case 
Javascript :: convert a string to array in javascript 
Javascript :: elasticsearch bulk json 
Javascript :: javascript hello world program 
Javascript :: ** javascript 
Javascript :: javascript fore each break example 
Javascript :: fetch to get data from server 
Javascript :: how to check if browser is firefox in javascript 
Javascript :: api testing app with websocket 
Javascript :: Shopify.formatMoney 
Javascript :: loop through json array python 
Javascript :: Material-UI: A component is changing the default value state of an uncontrolled Select after being initialized. To suppress this warning opt to use a controlled Select. 
Javascript :: javascript promise.all 
Javascript :: react native flexbox 2 columns 1 fixed width 
ADD CONTENT
Topic
Content
Source link
Name
9+2 =