Im trying to return the value that a $ajax call returns, from a function but it only returns \"undefined\". If a alert the \"reponse\" from the ajax call it returns the rigth va
You're doing 2 ajax requests which are identical. To improve performance you should pass an array of IDs to your CandidateName method and then your server-side script also should return an array of matched names.