Is there any error handling associated with this code (I don't wanna use MsgBox here). DownloadFile is a BackgroundWorker Control ... Label1 is a label control to show error.
THIS CODE ISN"T WORKING AT ALL ... (InvalidOperationException error is displayed)
vb Code:
Private Sub DownloadFile_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles DownloadFile.DoWork
On Error GoTo ErrorOccExcep
My.Computer.Network.DownloadFile("http://www.example.com/file.txt", "C:\file_temp.txt")
ErrorOccExcep:
Label1.Text = "Error occurred!"
End Sub
Help please ...