Gets the textual response without the 3-digit response code and CR/LF's.
Syntax
| Visual Basic (Declaration) | |
|---|
Public ReadOnly Property Text As String |
| Visual Basic (Usage) | Copy Code |
|---|
Dim instance As Response
Dim value As String
value = instance.Text |
| Managed Extensions for C++ | |
|---|
public: __property string* get_Text(); |
Property Value
A string representing the test response parsed from the raw response.
Example
The following example demonstrates using Invoke to send a custom command.
| Visual Basic | Copy Code |
|---|
' Set server and user properties. This will allow us to call other
' Ftp Component methods with the log in taking place "behind the scenes"
Ftp1.Server = "MyFTPServer"
Ftp1.Username = "blah"
Ftp1.Password = "mypass"
' Invoke a command
Dim invoke as Dart.PowerTCP.Ftp.Invoke
' Use Invoke(FtpCommand.Null) to send a proprietary command
Try
invoke = Ftp1.Invoke(Dart.PowerTCP.Ftp.FtpCommand.Null, "MYFILECOMMAND file1.txt")
Catch ex As Exception
Debug.WriteLine("Error: " + ex.Message)
Exit Sub
End Try
' Success. Print response.
Debug.WriteLine("Response from server : " + invoke.Response.Text)
Ftp1.Close() |
| C# | Copy Code |
|---|
// Set server and user properties. This will allow us to call other
// Ftp Component methods with the log in taking place "behind the scenes"
ftp1.Server = "MyFTPServer";
ftp1.Username = "blah";
ftp1.Password = "mypass";
// Use Invoke(FtpCommand.Null) to send a proprietary command
try
{
Dart.PowerTCP.Ftp.Invoke invoke = ftp1.Invoke(Dart.PowerTCP.Ftp.FtpCommand.Null, "MYFILECOMMAND file1.txt");
}
catch(Exception ex)
{
Debug.WriteLine("Error: " + ex.Message);
return;
}
// Success. Print response
Debug.WriteLine("Response from server : " + invoke.Response.Text);
// Close connection
ftp1.Close(); |
Remarks
Requirements
Target Platforms: Microsoft .NET Framework 2.0
See Also