hey guys, i have read This post, so what i got is JSON is the easiest way to translate a JavaScript object into a PHP/C# associative array or object (and vice-versa).
Now my question is what is goin' on in below code,i.e without JSON/XML i'm still can access my C# object in Javascript, may be i'm wrong, if so Please correct me:
C#
Foreach(DataRow dr in dvItems.Table.Rows) //dvItems is a DataView { strItems &= "'" & dr("ItemTitle") & "'," //strItems is a String } strItems = strItems.Trim(",") Javascript : here i'm using Autocomplete.js using JQuery
function InitAutocomplete() { data = [<%=strItems %>].sort(); AutoComplete_Create('<%=txtItem.ClientId %>', data); } See i'm using strItems in javascript with servertag, so where exactly the JSON is used ? is .net doin' something internally ? i'm totally confused how JSON/XML is used to data passing ?