>>The Details method is never called :( I don't know how to really trace jquery as the underlying code is too hard for me. I see something is going on in the debugger, but I never see any alert.
>>
>>I've changed the code to
>>
>>
>> $.getJSON(url, id, function (data) {
>> // setFormControls(data.Id, data.Role, data.Location, data.JobType, data.Description);
>> alert(data);
>> });
>>
>>Do you or anyone see what is wrong here?
>
>If it's not returning then presumably the url is wrong. Does the controller get hit?
Ok, I fixed the call to getJSON (should have been url, function(data)) instead and now it fires.
Now, how can I see what it's returning?
I put in immediate window
Json(client, JsonRequestBehavior.AllowGet)
{System.Web.Mvc.JsonResult}
base {System.Web.Mvc.ActionResult}: {System.Web.Mvc.JsonResult}
ContentEncoding: null
ContentType: null
Data: {System.Data.Entity.DynamicProxies.Client_8B8510D35F377BDF2801C2613DF2C7A2FC849E56C6D6F82D8975364BC7D1076E}
JsonRequestBehavior: AllowGet
MaxJsonLength: null
RecursionLimit: null
But I do not see how can I see the actual data now?
Ok, looking at
http://knockoutjs.com/documentation/json-data.html now. I think my head will explode at some point.
If it's not broken, fix it until it is.
My Blog