Access json data outside of $.getJSON()

$(document).ready(function () { var value = getParmsVals()["search"]; $.getJSON('/api/search/GetQuestionByKey/' + value, function (jsonData) { $(jsonData).each(function (i, item) { var name = getAuthorName(item.userId); }); }); }); function getAuthorName(userId) { var fullname = "default"; $.getJSON('/api/search/GetUserById/' + userId, function (jsonData) { fullname = jsonData.firstname + " " + jsonData.lastname; }); return fullname; } I’m trying to access the fullname … Read more

Working with JSON on the Server-Side in ASP.NET and C#

I have an ASP.NET web form that is using JQuery on the client-side. I have a user interface that is building a collection of objects and storing them in JSON. With my client-side implementation complete, I need to now work with that information when the user clicks a button. When this button is clicked, I need to loop through that JSON collection and validate the entries. My problem is, I’m not sure how to do it.

MS JSON date serialization and daylight saving time

We have an Ajax web service hosted in an ASP.NET application. This service accepts a DateTime parameter which, for the purposes of this question, should receive the DateTime equivalent of /Date(1359727200000-0200)/, which is a MS-JSON literal for Feb 1, 2013 9:00 AM in Brazil time. This literal is what the browser sends within the Ajax request.

JqGrid addJSONData + ASP.NET 2.0 WS

I am a bit lost. I’ve tried to implement a solution based on JqGrid and tried to use function as datatype. I’ve setted all by the book I guess, I get WS invoked and get JSON back, I got succes on clientside in ajax call and I “bind” jqGrid using addJSONData but grid remains empty. I do not have any clue now… other “local” samples on same pages works without a problem (jsonstring …)