edtFTPnet/Free - Open-source FTP component for .NET | Download
User-name of account on the server.

Namespace: EnterpriseDT.Net.Ftp
Assembly: edtFTPnet (in edtFTPnet.dll) Version: 2.2.3.0

Syntax

C#
public virtual string UserName { get; set; }
Visual Basic
Public Overridable Property UserName As String
	Get
	Set
Visual C++
public:
virtual property String^ UserName {
	String^ get ();
	void set (String^ value);
}

Field Value

The user-name of the account the FTP server that will be logged into upon connection.

Remarks

This property must be set before a connection with the server is made.

Examples

The following example illustrates an FTP client connecting to a server:
 Copy imageCopy
            FTPConnection ftp = new FTPConnection();
            ftp.ServerAddress = "my-server-name";
            ftp.UserName = "my-username";
            ftp.Password = "my-password";
            ftp.Connect();
            ftp.Close();
            

See Also