hi to all,
I written a web method ListTask() which returns array ob object of class TaskList which give me result in xml form
I want to bind that result to table in asp.net 3.5 aspx page by calling that webMethod in jQuery ajax call.
I have tried many ways one of them is -
$.ajax({
type: "GET",
url: webmethod,
data: param,
dataType: "xml",
complete: function processResult(xData) {
alert(xData);
$(xData).find("TaskList").each(function() {
alert($(this).attr("TaskName"));
// $("#data").append($(this).attr("TaskName") + "<br/>");
});
}
});
It gives me error.
If I parse results by changing datatype json and parsing it by parsetojson method then it returns 'undefined'.
please help me out.