views:

289

answers:

2

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?

+1  A: 

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,

Matthew Flaschen
Thanks, I'll give that a shot.
Charlie Somerville
Excellent! It worked.Thanks Matthew
Charlie Somerville
A: 

This link is help full File upload with progress in C#

Ummar