Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 27th, 2012  |  syntax: None  |  size: 0.61 KB  |  hits: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Silverlight multiple callbacks within the same host not working
  2. HttpWebRequest HttpWebRequest = (HttpWebRequest)WebRequest.Create(UploadUrl);
  3. HttpWebRequest.Method = "POST";
  4. HttpWebRequest.BeginGetRequestStream(new AsyncCallback(WriteFile), HttpWebRequest);
  5.        
  6. HttpWebRequest.BeginGetResponse(new AsyncCallback(ReadCallback), HttpWebRequest);
  7.        
  8. WebClient WebClient = new WebClient();
  9. WebClient.DownloadStringCompleted += new DownloadStringCompletedEventHandler((object sender2, DownloadStringCompletedEventArgs e2) =>
  10. {
  11.     //Tell the client the file is done
  12. });
  13. WebClient.DownloadStringAsync(new Uri(processUrl));