This is my WebService Method:
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public string getlastimages()
{
DBservices DBS = new DBservices();
List<string> ImageUrls = new List<string>();
try
{
DBS.getLastImages();
ImageUrls = DBS.ImgUrlList;
}
catch(Exception ex)
{
throw ex;
}
JavaScriptSerializer js = new JavaScriptSerializer();
string jsonImage = js.Serialize(ImageUrls);
return jsonImage;
}
This is the data that i'm receiving after running this method:
<string xmlns="http://tempuri.org/">
["~\\images\\benny\\1149468-18.jpg","~\\images\\lior\\photo4.jpg","~\\images\\oren\\photo3.jpg","~\\images\\oren\\photo2.jpg","~\\images\\oren\\photo1.jpg"]
</string>
I'm new with $.ajax method, and I need help writing the $.ajax method to retrieve this data from that list. Any help would be great.