# Webclient upload complete

**URL:** <https://forum.kirupa.com/t/webclient-upload-complete/321179>\
**Category:** Uncategorized\
**Created:** [April 12, 2011, 5:30pm UTC](https://forum.kirupa.com/t/webclient-upload-complete/321179 "2011-04-12T17:30:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![real](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@real](https://forum.kirupa.com/u/real)\
**Post date:** [April 12, 2011, 5:30pm UTC](https://forum.kirupa.com/t/webclient-upload-complete/321179/1 "2011-04-12T17:30:16Z")

</div>

Hi,  
before all i need to say thank you for your amazing site, i found a lot of interesting stuff here thats help a noob like me. btw now i’ve a problem with a wp app, look this piece of code.

```auto

 foreach (string line in lines)
            {
              
                Uri site= new Uri(turl.Text);

               
                WebClient client = new WebClient(); 
              
                client.Headers["Content-Type"] = "application/x-www-form-urlencoded"; 
                client.Encoding = Encoding.UTF8; 
                client.UploadStringAsync(site, "GET", line);
                client.UploadStringCompleted += new UploadStringCompletedEventHandler(client_UploadStringCompleted); 
        
 

            }
            }
            catch (Exception)
            {

            }

        }

     
        void client_UploadStringCompleted(object sender, UploadStringCompletedEventArgs e) 
        {
          check(e.Result); // check if some string is present on html output
         
          
        }

```

I would like to get the html from each page on the site but the webclient doesn’t wait to complete the event so i can’t retrive and parse the html. I hope you could help me. Thanks in advance
