I am using this code to retrieve an url content:
private ArrayList request(string query)
{
ArrayList parsed_output = new ArrayList();
string url = s
i had the same problem with WP7 i solved this method.await is not working wp7 but if you use Action you will callback Async functions
public void Download()
{
DownloadString((result) =>
{
//!!Require to import Newtonsoft.Json.dll for JObject!!
JObject fdata= JObject.Parse(result);
listbox1.Items.Add(fdata["name"].ToString());
}, "http://graph.facebook.com/zuck");
}
public void DownloadString(Action callback, string url)
{
WebClient client = new WebClient();
client.DownloadStringCompleted += (p, q) =>
{
if (q.Error == null)
{
callback(q.Result);
}
};
client.DownloadStringAsync(new Uri(url));
}