you can return
string of DataSet XML
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
public DataSet GetAllExhibitionList()
{
DALSearch objdal = new DALSearch();
return objdal.GetAllExhibitionDetail().GetXml();
}
<script type="text/javascript">
$(function () {
debugger;
$.ajax({
type: 'post',
url: 'WebServices/DataLoading.asmx/GetAllExhibitionList',
data: {},
contentType: 'application:JSON;charset:UTF-8',
success: OnSuccess,
failure: function (response) {
alert(response.d);
},
error: function (response) {
alert(response.d);
}
});
});
function OnSuccess(response) {
$(response).find('Table').each(function () {
alert($(this).find("Column1").text());
});
}
</script>