'DeclarationPublic Event CommandSent As CommandSentEventHandler
'UsageDim instance As FtpClient Dim handler As CommandSentEventHandler AddHandler instance.CommandSent, handler
public event CommandSentEventHandler CommandSent
The event handler receives an argument of type CommandSentEventArgs containing data related to this event. The following CommandSentEventArgs properties provide information specific to this event.
| Property | Description |
|---|---|
| Command | Gets the command that was sent to the FTP server. |
To be notified when a reply is received from the FTP server, subscribe to the ReplyReceived event.
This event is the equivalent of the LoggingCommandLine event of the ActiveX version of the Xceed FTP Library.
Xceed.Ftp.Licenser.LicenseKey = "FTNXX-XXXXX-XXXXX-XXXX" ' Set license key here to deploy Dim ftp As New FtpClient() AddHandler ftp.CommandSent, AddressOf Me.command_sent ftp.Connect( "localhost" ) ftp.Login() ftp.GetFolderContents() ftp.Disconnect() Private Sub command_sent( ByVal sender As Object, ByVal e As CommandSentEventArgs ) listBox1.Items.Add( ">> " + e.Command ) listBox1.SelectedItem = listBox1.Items.Count - 1 End Sub
Xceed.Ftp.Licenser.LicenseKey = "FTNXX-XXXXX-XXXXX-XXXX" // Set license key here to deploy FtpClient ftp = new FtpClient(); ftp.CommandSent += new CommandSentEventHandler( this.command_sent ); ftp.Connect( "localhost" ); ftp.Login(); ftp.GetFolderContents(); ftp.Disconnect(); private void command_sent( object sender, CommandSentEventArgs e ) { listBox1.Items.Add( ">> " + e.Command ); listBox1.SelectedItem = listBox1.Items.Count - 1; }
Xceed.Ftp.Licenser.LicenseKey = "FTNXX-XXXXX-XXXXX-XXXX" // Set license key here to deploy FtpClient ftp = new FtpClient(); ftp.CommandSent += new CommandSentEventHandler( this.command_sent ); ftp.Connect( "localhost" ); ftp.Login(); ftp.GetFolderContents(); ftp.Disconnect(); private void command_sent( object sender, CommandSentEventArgs e ) { listBox1.Items.Add( ">> " + e.Command ); listBox1.SelectedItem = listBox1.Items.Count - 1; }
.NET: net5.0, net5.0-windows, net6.0, net6.0-macos, net6.0-windows, net7.0, net7.0-macos, net7.0-windows, net8.0, net8.0-browser, net8.0-macos, net8.0-windows, net9.0, net9.0-browser, net9.0-macos, net9.0-windows, net10.0, net10.0-browser, net10.0-macos, net10.0-windows.
.NET Standard: netstandard2.0, netstandard2.1
.NET Framework: net20, net35, net40, net403, net45, net451, net452, net46, net461, net462, net463, net47, net471, net472, net48, net481.