Private Sub Btn_SendFtp_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btn_SendFtp.Click
Try
'Create Request
Dim Request As System.Net.FtpWebRequest = DirectCast(System.Net.WebRequest.Create("ftp://ftp.myweb.com/public_html/test.txt"), System.Net.FtpWebRequest)
'Upload Properties
Request.Credentials = New System.Net.NetworkCredential("user", "password")
Request.Method = System.Net.WebRequestMethods.Ftp.UploadFile
'Read File
Dim File() As Byte = System.IO.File.ReadAllBytes("c:\myfile.text")
'Upload
Dim Strz As System.IO.Stream = Request.GetRequestStream()
Strz.Write(File, 0, File.Length)
Strz.Close()
Strz.Dispose()
MessageBox.Show("Upload Done", "Messsage")
Catch ex As Exception
MessageBox.Show(ex.Message, "Messsage")
End Try
End Sub