hi there ..
i am developing a web application and need to show the progress, i send a thred to threadpool then need control of progress event and progress value ...
i define some control class
..............//// a button click raise the upload
if (((StatusFtpUpload)Application["ftpupload"]).Running == false){
ThreadPool.QueueUserWorkItem(new WaitCallback(FtpUpload), ((StatusFtpUpload)Application["cpx_ftpupload"]));
}
// the procedure polled in threadpool that need update the stateInfo.progress value
static void FtpUpload(Object stateInfo) {
StatusFtpUpload status = (StatusFtpUpload)stateInfo;
Rebex.Net.Ftp ftpcontrol = new Rebex.Net.Ftp();
try {
ftpcontrol.Connect(status.FtpData.IpServer);
ftpcontrol.Login(status.FtpData.User, status.FtpData.Password);
ftpcontrol.PutFiles(status.FtpData.LocalFolder, status.FtpData.RemotePath, FtpBatchTransferOptions.Recursive, FtpActionOnExistingFiles.OverwriteAll);
//try do someting with events but dont find how control the progress nither value
}
finally {
status.Running = false;
}