Open file and Save Problem

  •  07-30-2008, 10:13 AM

    Open file and Save Problem

    Hi,
    Can you help me, i load content of a file to editor
    Like this:
    Editor1.LoadFile(filename);
    and i change this content with the editor. And i wanna save changes on the editor.
     
    i use this code:

                FileStream fs = File.Open(filename, FileMode.Create, FileAccess.ReadWrite);
                StreamWriter writer = new StreamWriter(fs, Encoding.UTF8);
                writer.Write(Editor1.XHTML);
                writer.Close();
                writer.Dispose();
                or
                textbox1.Text = Editor1.XHTML;

     When i clicked submit button, i cannot save to file.
    or i cannot add "Editor1.XHTML" to a textbox.
     
    (This codes are all right when Editor wasn't loaded from a file)
View Complete Thread