Hi, I can read a css file and display it in a textbox but can't figure out how to save changes. In other words how to write or overwrite a css file. I'm working on a simple cms app and would like to be able to make changes to the css files when needed.
Reading the file seems so simple but writing to it I don't understand. Can you help?
Read:
if (File.Exists(this.MapPath("~/admin/themes/default/default2.css")))
{
string cssFile = File.ReadAllText(this.MapPath("~/admin/themes/default/default2.css"));
TextBox1.Text = cssFile.ToString();
}
else
{
Response.Write("<script language='javascript'>window.alert('File not found...');</script>");
}
...
Go to the complete details ...