I have a problem with Json formating returned from .ASMX
I need to return something like this
[{ name : "TEST1", data : [100]},
{ name : "TEST2", data : [200]}]
so here's my sample
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json, UseHttpGet = true)]
public List<jsonGraphSeries> Graph(string ID)
{
List<GenList>objGenList = new List<GenList>();
GenList objlist;
objlist = new GenList();
objList.name = "TEST";
objList.data[0] = 100;
objGenList.add(objList);
}
public class GenList
{
public string name;
public double[] data;
}
and nothing happens... can someone help me with this?