What I have tried:
in WebService1.asmx, there is a method that return list array.
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public List
{
//according to the Query parameter to do your logic
List
lstStudents.Add(new Student { StudentID = 1, StudentName = "ABC" });
lstStudents.Add(new Student { StudentID = 2, StudentName = "DEF" });
lstStudents.Add(new Student { StudentID = 3, StudentName = "GHI" });
lstStudents.Add(new Student { StudentID = 4, StudentName = "JKL" });
return lstStudents;
}
public class Student
{
public int StudentID { get; set; }
public string StudentName { get; set; }
}
in Default.aspx,
in body of html
can anyone tell me where the error is and how can I fix this?
Thanks all

JohnPosted Aug 26, 2016, 2:37 AM