0

The title of this question should be self explanatory, but basically I have this code (working)

 progfrm = new progressform(); System.Net.WebClient ahwebclient = new System.Net.WebClient(); progfrm.Show(); ahwebclient.UploadProgressChanged += new System.Net.UploadProgressChangedEventHandler(ahwebclient_UploadProgressChanged); ahwebclient.UploadFileCompleted += new System.Net.UploadFileCompletedEventHandler(ahwebclient_UploadFileCompleted); ahwebclient.UploadFileAsync(new Uri("http://upload.anyhub.net/bin/demovu_upload.php"), "C:/install.exe"); while (ahwebclient.IsBusy) { Application.DoEvents(); } 

How would I read this result of this request once it is completed?

2
  • What is in your ahwebclient_UploadFileCompleted event handler method? Commented Apr 19, 2009 at 23:48
  • void ahwebclient_UploadFileCompleted(object sender, System.Net.UploadFileCompletedEventArgs e) { progfrm.Close(); progfrm.Dispose(); } Commented Apr 19, 2009 at 23:49

1 Answer 1

1

You get it from the Result property of UploadFileCompletedEventArgs (http://msdn.microsoft.com/en-us/library/system.net.uploadfilecompletedeventargs_members(VS.80).aspx). You already have a UploadFileCompletedEventHandler, so you just need to modify the method implementing that delegate,

Sign up to request clarification or add additional context in comments.

Comments