private Task<string> WebRequestAsync(String urlforcollection) { return Task.Factory.StartNew(() => { HttpWebRequest request = (HttpWebRequest)WebRequest.Create(urlforcollection); request.Proxy = null; request.Method = "GET"; WebResponse response = request.GetResponse(); Stream mystream = response.GetResponseStream(); htmlDocument.Load(mystream); response.Close(); MessageBox.Show("Finished"); return ""; }); }
await WebRequestAsync("http://fartjuice.org.uk"); if (WebRequestAsync("http://fartjuice.org.uk").IsCompleted == true) { AddDataToCollections(); LoadToUI(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)