1
我有一个ASP.NET WebService的返回列表的对象webservice的jQuery中返回集合类型
public class Students
{
public string StudentName { get; set; }
public int Age { get; set; }
}
我使用这个jQuery代码
$.ajax({
type: "POST",
url: "/Students.asmx/GetStudents",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(msg) {
$("#myDiv").html(msg.d);
}
});
访问此WebService但我得到的是对象对象。
如何获取该对象中的数据?
由于重复这样much..I忘了提,我使用jmsajax而不是$就..所以当我做什么你suggest..i得到d.length为空或不是对象。 – Musa 2009-05-19 12:54:36