Ive now got it so the list of FTP files are appearing on the screen and I am now able to select a file from the list and download it.
The problem I have now is that when I load the page, instead of each file only appearing in the list once, each file appears multiple times.
Below is the code that I am using:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
Dim ftp As FtpWebRequest = DirectCast(WebRequest.Create("ftp://xx.x.xx.xx/In/"), FtpWebRequest)
ftp.Method = WebRequestMethods.Ftp.ListDirectory
Dim ftpFiles As New ArrayList()
ftp.Credentials = New NetworkCredential("user", "password")
Dim Response As FtpWebResponse = ftp.GetResponse()
Dim responseStream As Stream = Response.GetResponseStream()
Dim reader = New StreamReader(responseStream)
While Not (reader.EndOfStream)
For Each file In ftpFiles
I want it so that each file only appears once in the list.