I want the download button to update while a file download is in progress - "Connecting ", "Downloading.." , etc. But with the code below, it does not update the text. I've read about Application.DoE vents() but also heard that this isn't the best route to take? If it is OK to use Application.DoE vents(), where should I use it?
Code:
button1.Text = "Connecting...";
Uri URL = new Uri("http://mahcuz.com/projectdownload/ClipboardIP/updatediplist.xml");
try
{
WebClient Client = new WebClient();
button1.Text = "Downloading...";
Client.DownloadFile(URL, Application.StartupPath + "/IP.xml");
button1.Text = "Finished";
}
catch (Exception Ex)
{
button1.Text = "Failed";
}
Comment