File open/save

Topics: User Forum
May 22, 2011 at 2:13 PM

How to open a file with OpenFileDialog and save with FileSaveDialog?

May 23, 2011 at 2:42 PM

OpenFileDialog OfD = new OpenFileDialog();
if (DialogResult.OK == OfD.Show())
{

     //Do something here with the Filename Property
     String Blah = System.IO.File.ReadAllText(OfD.FileName);

}

I'll let you guess how FileSaveDialog Works from the Above.

Feb 9, 2012 at 5:14 AM

Hi Coven,

I am using ScintillaNET text editor and would like to know how the save functionality will work for it.

Could you please let me know.

Sanjai


Coordinator
Feb 14, 2012 at 5:09 PM
Edited Feb 14, 2012 at 5:11 PM

smilysanjai,

ScintillaNET has no built-in way of saving files. See where I answered your question over here http://scintillanet.codeplex.com/discussions/299496?

You'll have to write a whole line of text on your own, e.g.:

System.IO.File.WriteAllText("yourfileName.txt", scintilla.Text);