how to get value from json result calling by ajax method
$.ajax({
type: "POST",
url:'@Url.Action("Shortlist", "Search")' ,
dataType: "json",
data: '{candidateid: "' + shortlistid + '" }',
contentType: "application/json",
success: function (response) {
alert(response.data);
}
})
[HttpPost]
public JsonResult Shortlist(string candidateid)
{
string output = "User Shortlisted";
return Json(output,JsonRequestBehavior.AllowGet);
}