Ultimate Studio
All essential components included
|
| Atp UltimateFtp | |
| Creating a Web Application | |
| Send comments on this topic to ATP, Inc. | |
| Getting Started > Creating a Web Application |
Glossary Item Box
This tutorial will walk you through creating a Web Application and add Ftp library to it.
| C# | Copy Code |
|---|---|
|
// Create a new instance. Ftp client = new Ftp(); // Connect to the FTP server. client.Connect("localhost"); // Authenticate. client.Authenticate("test", "test"); // Upload local file 'c:\test.dat' to the default remote directory. client.UploadFile("c:\\test.dat", "test.dat"); string defaultDir = client.GetCurrentDirectory(); label1.Text = string.Format("File has been successfully uploaded to '{0}'.", defaultDir); // Disconnect. client.Disconnect(); | |
| VB.NET | Copy Code |
|---|---|
|
' Create a new instance. Dim client As New Ftp() ' Connect to the FTP server. client.Connect("localhost") ' Authenticate. client.Authenticate("test", "test") ' Upload local file 'c:\test.dat' to the default remote directory. client.UploadFile("c:\test.dat", "test.dat") Dim defaultDir As String = client.GetCurrentDirectory() label1.Text = String.Format("File has been successfully uploaded to '{0}'.", defaultDir) ' Disconnect. client.Disconnect() | |