Thanks for your response.
You're welcome :-)
Thanks,
Jeff Bowman
Fairbanks, Alaska
Thanks for your response.
You're on the right track, then... my example is intended to demonstrate the concept only. It sounds like you already understand the concept.
In fact this is the way any application would do it, including WinSCP. It downloads the file to a temp folder, opens it with the appropriate editor, saves it, and then uploads it back to the source.
All that's left for you to do now is find an editor for ASP.NET that can work with your file type. That task is beyond the scope of this forum, of course, but you've already got a good head start on the job.
Hi, thanks for the repply
I forgot to mention that its an asp.net application, so I need to open the file directly from a local folder from within asp.net application. All examples that I saw in web are for download file not to open it.
Thanks
Best regards
Public Class Welcome
Inherits Page
Protected Sub Page_Load(Sender As Object, e As EventArgs) Handles Me.Load
' First use WinSCP to download your file from the server
' Then send the file contents to a multi-line TextBox
txtWebPageTextEditorField.Text = System.IO.File.ReadAllText(Request.MapPath("~/Files/DownloadedFile.txt"))
End Sub
Private Sub cmdSave_Click(Sender As Object, e As EventArgs) Handles cmdSave.Click
' Save the file after editing
System.IO.File.WriteAllText(Request.MapPath("~/Files/DownloadedFile.txt"), txtWebPageTextEditorField.Text)
' Now use WinSCP to upload your file back to the server you got it from
End Sub
End Class
Hello,
Is it possible to implement code using .net assembly, to do same action like in the FTP Client to EDIT a remote file?
I need to implement in my application a connection to a remote server, select a file, edit it and, when finished, upload it back to the remote server. That's exactly what is donne in the "Edit With" option of the WinSCP Client Application.
Thanks in advance.
Best regards