Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click Try Dim wc As New WebClient Dim fileurl As String = "http://www.nseindia.com/content/historical/EQUITIES/2012/AUG/cm28AUG2012bhav.csv.zip" Dim filelocation As String = "d:\aaaaa.zip" wc.Headers("Accept") = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" wc.Headers("User-Agent") = "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.83 Safari/537.1" wc.DownloadFile(fileurl, filelocation) Catch exception As Exception MsgBox("CAnnot Download") End Try End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)