39
rated 0 times
[
43]
[
4]
/ answers: 1 / hits: 46968
/ 9 Years ago, mon, july 13, 2015, 12:00:00
This is my controller,
public ActionResult ReturnMethodTest(int id)
{
string name = John;
return Json( new {data=name});
}
I am trying to get data from this controller by using code below but I am getting .
Can you please tell me what am I doing wrong?
$.ajax({
url: @Url.Action(ReturnMethodTest, HomeController),
data: {
id: 5,
},
success: function (data) {
console.log(data);
}
});
More From » jquery