/ Published in: C#
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
www.c-sharpcorner.com/uploadfile/danglass/ftpcl...9/23/08 private FtpClient ftp = null; private void UploadPicture(string imagePath) { string FtpServer = ConfigurationSettings.AppSettings["FtpServer"]; string FtpUserName = ConfigurationSettings.AppSettings["FtpUserName"]; string FtpPassword = ConfigurationSettings.AppSettings["FtpPassword"]; ftp.Login(); ftp.BeginUpload(imagePath, callback); ftp.Close(); } private void CloseConnection(IAsyncResult result) { Debug.WriteLine(result.IsCompleted.ToString()); if ( ftp != null ) ftp.Close(); ftp = null; }