I have an ASP.NET WebService that returns an object of List
public class Students
{
public string StudentName { get; set; }
public int Age { get; set; }
}
I am accessing this webservice using this jQuery code
$.ajax({
type: "POST",
url: "/Students.asmx/GetStudents",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(msg) {
$("#myDiv").html(msg.d);
}
});
But all i get is Object object.
How can I get the data in that object?