I have created a function in javascript like a class
function myclass
{
this.Id=null;
this.Name=null;
}
from other function i am returning a list(Array in javascript) of myclass
function ReturnList
{
var lst=[];
var objmyclass=new myclass();
objmyclass.Id=1;
objmyclass.Name="abc";
var objmyclass1=new myclass();
objmyclass1.Id=1;
objmyclass1.Name="abc";
lst.push(objmyclass);
lst.push(objmyclass1);
PageMethods.GetListData(lst,onsuccess);
return false;
}
How do i read the lst in my webmethod
[WebMethod()]
public static bool GetListData(datatype lst)
{
//How to read each item from lst
}