private void text_TextChanged(object sender, EventArgs e) { System.IO.StreamReader myFile2 = new System.IO.StreamReader("settin/fl.txt"); string stati = myFile2.ReadToEnd(); myFile2.Close(); if (stati == "true") stat.Text = "Fluid Save Is On."; else stat.Text = "Fluid Save Is Off."; System.IO.StreamReader myFile = new System.IO.StreamReader("settin/fl.txt"); string fls = myFile.ReadToEnd(); myFile.Close(); if (fls == "true") { save.Text = "saving...."; using (StreamWriter sw = new StreamWriter("settin/ftext.txt")) { // Add the document text to the file. sw.Write(text.Text); } save.Text = "Done"; } else { }; }
Saving text files to a server in c#, Need help.Help please
Page 1 of 1
3 Replies - 4004 Views - Last Post: 13 September 2009 - 10:43 AM
#1
Saving text files to a server in c#, Need help.
Posted 12 September 2009 - 08:15 PM
I have a program that saves every time the text is changed(Code Below) It currently saves to a local .txt file. I need it to save to a remote location (e.x. http://hawksprite.co...name/stuff.txt) But am not sure how to do it. Is there a ftp function that i can use? Much help needed, thanks.
Replies To: Saving text files to a server in c#, Need help.
#2
Re: Saving text files to a server in c#, Need help.
Posted 12 September 2009 - 09:31 PM
It all depends on how the server is set up. An HTTP PUT might work, or FTP, or SCP.
#3
Re: Saving text files to a server in c#, Need help.
Posted 13 September 2009 - 10:08 AM
#4
Re: Saving text files to a server in c#, Need help.
Posted 13 September 2009 - 10:43 AM
Have you tried searching Google for "ftp C#"?
Page 1 of 1