Hi, folk
I am having a weird problem now, when I use MVC Action to return a JSON string like following.
public ActionResult SearchSegment(string keyword)
{
return Json(new {foo = "bar", baz = "Blech"});
}
But when I try to retrieve the return value using following code , I get the object not defined error. Can anyone help me out? Thanks.
function SearchCompleteHandler(data) {
alert(data.foos);
}