First time out using WebClient().DownloadString
() to get data from a web page.
It works, but I have a label I want to set to something like "Loading Information..." before the download happens. This is because it takes a few moments for the call to complete. In this time, it looks like the app has hung to the user.
Despite setting the label prior to making this call, it does not show until AFTER the call completes.
this.status_label.Text = "Loading information...";
this.status_label.BackColor = Color.Green;
this.status_label.ForeColor = Color.White;
var response = new WebClient().DownloadString("http://whatever.com");
This is the code. Simple enough, but the status_label text and color only change after the downloadstring call completes.
Can I put up some kind of hourglass or notice or progress bar so the user knows something is working?