I have build a project that user can upload,view,edit and save their file in the specific folder. I using TinyMCE for the editing but I can't find the way how to save the content after editing. Anybody can give some advice to me?
here is how you can save values of your TinyMCE control.
String OutPath = Server.MapPath("~/myfiles/test.txt"); // here '~/' refers to root of your website
StreamWriter Out1 = new StreamWriter(OutPath);
Out1.WriteLine(TextBox1.Text.Trim());
Out1.Close(); //Close File
Assume you need to save the html in the HtmlFiles
folder inside your root folder and the file name is test.html
.
string path = Server.MapPath("~/HtmlFiles/test.html");
File.WriteAllText(path ,yorTextBox.Text);
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.