Hello!
I am trying to open a file that is selected by a user from the openfiledialog box, but the file does not open. Below is the part of the code that does so...
............... ............... ............... ............... ........
OpenFileDialog fdlg = new OpenFileDialog( );
fdlg.Filter = "Text Files(*.txt)|*. txt";
fdlg.RestoreDir ectory = true;
if (fdlg.ShowDialo g() == DialogResult.OK )
{
// fdlg.OpenFile() ; //this does not open the selected file
textBoxOutput.T ext = fdlg.FileName;
fdlg.OpenFile() ; //this does not open the selected file
}
............... ............... ............... ............... ...........
Please help....
Thank you....
I am trying to open a file that is selected by a user from the openfiledialog box, but the file does not open. Below is the part of the code that does so...
............... ............... ............... ............... ........
OpenFileDialog fdlg = new OpenFileDialog( );
fdlg.Filter = "Text Files(*.txt)|*. txt";
fdlg.RestoreDir ectory = true;
if (fdlg.ShowDialo g() == DialogResult.OK )
{
// fdlg.OpenFile() ; //this does not open the selected file
textBoxOutput.T ext = fdlg.FileName;
fdlg.OpenFile() ; //this does not open the selected file
}
............... ............... ............... ............... ...........
Please help....
Thank you....
Comment