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.
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