简体   繁体   中英

Upload file in FTP server by using progress bar with C#

I have to upload a huge file in FTP server and using progress bar.

How can i perform this without using any third free components?

Best regards.

You can get a code to specify the size of the file already in the server and bind it to a timer. Then, based on the file size of the file being uploaded, you will be able to deduce the size already uploaded.

I'll get you the code, but I'd suggest you get them on separate threads as they will slow down the system considerably.

You can't do this proper only with plain ASP.NET. For the state of the progress bar you'll need some JavaScrip/AJAX action or a Flash object. If you don't want to go with a free 3rd party component, you need to write it by yourself. There's no build-in ASP.NET functionality.

Update

Since the use of AJAX is a possibility for you, this article might be interesting:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM