There are a few things you need to consider during implementation. I've also attached the code segment to understand things better and in a more convenient way for all geeks, who want to implement it.
You need to add a reference to System.Net to use the FtpWebRequest object.
The code is given below to upload the file using FTP.
![Upload file]()
The status description given above describes that the data (File) has been uploaded to the FTP site with the "Transfer OK" message.
response.Close();
A similar approach is for deleting any file from FTP, whilst the only difference you are required to set is WebRequestMethods.Ftp.DeleteFile. The code is available below.
![FTP]()