FtpClientConnection.ServerPassword 属性

定义

为在 ServerName 属性中指定的服务器设置密码。 此属性是只写的。

public:
 property System::String ^ ServerPassword {  void set(System::String ^ value); };
public string ServerPassword { set; }
member this.ServerPassword : string
Public Property ServerPassword As String

属性值

ServerName 属性中指定的服务器密码。

示例

下面的代码示例演示如何设置密码。

Package pkg = new Package();  
FtpClientConnection ftp = null;  
Connections conns = pkg.Connections;  
ConnectionManager cm = conns.Add("FTP");  
cm.Properties["ServerPassword"].SetValue(cm, "thepassword");  
Dim pkg As Package =  New Package()   
Dim ftp As FtpClientConnection =  Nothing   
Dim conns As Connections =  pkg.Connections   
Dim cm As ConnectionManager =  conns.Add("FTP")   
cm.Properties("ServerPassword").SetValue(cm, "thepassword")  

适用于