> Public Sub GetFile(ByVal fName As String, ByVal ftpPath As String, ByVal locPath As String) > Dim client As New WebClient > AddHandler client.DownloadFileCompleted, AddressOf DownloadFileComplete > ' Specify a progress notification handler. > AddHandler client.DownloadProgressChanged, AddressOf DownloadProgress > Try > client.Credentials = New NetworkCredential("upgrades", "jamboree8035") > > client.DownloadFileAsync(UriPath, locPath) > Finally > 'Response.Redirect("default.aspx") > End Try > End Sub > > Public Sub DownloadFileComplete(ByVal sender As Object, ByVal e As DownloadDataCompletedEventArgs) > Response.Redirect("~/default.aspx") > End Sub > > Sub DownloadProgress(ByVal sender As Object, ByVal e As DownloadProgressChangedEventArgs) > Me.Label1.Text = e.ProgressPercentage.ToString > End Sub > > Protected Sub btnCancel_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnCancel.Click > Dim client As New WebClient > client.CancelAsync() > client.Dispose() > End Sub >>