I want set result to variable from MVC controller method.
function someFunction(){
var result;
$.Ajax{
//???
}
return result;
}
//In comparison to c++
int f() { //just! return result; }
P.S.: It is not async, it should be sync function call in order to return value to the function body.
set up a controller
set up the ajax request, remember to make it
async:false, which is by default true, in order to return the valuenow you can call the function like