I am Calling an ASP.NET C# Method (Web Method) Using JavaScript.
C#:
[WebMethod]
public static List<Employee> GetEmployeeList(int DeptID,out int TotalRecordsCount)
{
<Employee> obj = new List<Employee>();
//obj = Geting reocrds from Database
TotalRecordsCount = obj.Count();
return obj;
}
Javascript:
function BindList(){
var DeptID = 10;
var TotalRecordsCount = 0;
PageMethods.GetEmployeeList(DeptID,TotalRecordsCount,onsuccess);
}
Now I am getting errors, while calling above js method. Please suggest me where I done mistake.
My main aim is that, Instead of returning single list, Can I add 2 or more different lists ?
Thanks in adv.