asma

asma

  • NA
  • 507
  • 0

Copying file error.

Jun 23 2008 8:31 AM
Hi m trying to copy image file from one location to other as below in openDialog box C#.net
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
            string filename = System.IO.Path.GetFileName(openFileDialog1.FileName);

          string fname = Application.StartupPath + "\\Temp\\" + filename;
                File.Copy(openFileDialog1.FileName, fname, true);
}


I get Exception as
   Unknown software  Exception(0xe0434f4d) ocurred in application at location 0x7c59bcb1
It works for all files except for .bmp file
Ne help for it?

    

Answers (4)