Advertisement
Guest User

Untitled

a guest
Mar 21st, 2015
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. Hide Copy Code
  2.  
  3. WebClient webClient = new WebClient();
  4. // Register the callback
  5. webClient.DownloadStringCompleted += new DownloadStringCompletedEventHandler(webClient_DownloadStringCompleted);
  6. webClient.DownloadStringAsync(new System.Uri(YOUR_URL));
  7.  
  8. void webClient_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
  9. {
  10. if (e.Error == null)
  11. {
  12. updateSomething(e.result);
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement