This is my code on the webservice which sucessfully creates the xml file and saves at particular destination folder.
public bool GetList(string keyword1, string streetname, string lat, string lng, string radius)
{
XmlDocument xmlDoc= CreateXML( keyword1,streetname,lat,lng,radius);
xmlDoc.Save(@"C:\Documents and Settings\block\Block3.xml");
return true;
}
I am trying to read that file from clientside application with the following code,but i am facing some problem with it.
$.ajax({
type: "POST",
async: false,
url: "/block/JsonWebService.asmx/GetList",
data: keyword2,
contentType: "application/json; charset=utf-8",
dataType: "json",
failure: ajaxCallFailed,
success: ajaxCallSucceed
});
});
function ajaxCallSucceed(response) {
if (response.d == true) {
searchLocationsNear();
}
else {
alert("can not save");
}
}
function searchLocationsNear() {
var radius = document.getElementById('radiusSelect').value;
var searchUrl ="Block3.xml";// is this the correct way to refer to the
xml file stored in app folder
GDownloadUrl(searchUrl, function(data) {
var xml = GXml.parse(data);
........................................
.......................................