Jquery 调用webservice返回xml
$(document).ready(function() {
$("#btnQuery").click(function() {
$.ajax({
type: "POST",
url: "WebService.asmx/GetData",
data: "{pageId:'" + $("#pageId").val() + "'}",
data: "{pageId:1}",
dataType: "xml",
contentType: "application/json",
success: function(result) {
SetView(result);
}
,
error: function(e, status) {
alert(e.responseText);
}
});
return false;
});
});
上面是ajax代码,
webservice 则根据传进的pageId查询数据,直接返回dataset
可是报出如下错误:
序列化类型为"System.Globalization.CultureInfo"的对象时检测到循环引用