My plan is to have a user write down a movie title in my program and my program will pull the appropiate information asynchronously so the UI doesn\'t freeze up.
Her
You need to handle the DownloadDataCompleted event:
static void Main()
{
string url = "http://google.com";
WebClient client = new WebClient();
client.DownloadDataCompleted += DownloadDataCompleted;
client.DownloadDataAsync(new Uri(url));
Console.ReadLine();
}
static void DownloadDataCompleted(object sender,
DownloadDataCompletedEventArgs e)
{
byte[] raw = e.Result;
Console.WriteLine(raw.Length + " bytes received");
}
The args contains other bits of information relating to error conditions etc - check those too.
Also note that you'll be coming into DownloadDataCompleted on a different thread; if you are in a UI (winform, wpf, etc) you'll need to get to the UI thread before updating the UI. From winforms, use this.Invoke. For WPF, look at the Dispatcher.