To send a JSON array in a postback, via hidden field, you can write this simple function.
On the postback event you can read your HiddenField like this:
Remember to reference the System.Web.Extensions.dll.
GridResponse class is declared as same structure of the JSON:
I use in C#
ReplyDeletevar json2 = JsonConvert.SerializeObject(listaCursos, Formatting.Indented, jsonSerializerSettings);
formHiddenField2.Value = json2;
How can I get hidden value using JQuery in client ?
var value = JSON.parse($("#yourhiddenfieldid").val());
Delete