OpenFileDialog ofd = new OpenFileDialog();
ofd.Title = "Select Student Picture";
ofd.InitialDirectory = @"C:\Picture";
ofd.Filter = "All Files|*.*|JPEGs|*.jpg";
//ofd.Multiselect = false;
if (ofd.ShowDialog()==DialogResult.OK)
{
if (ofd.CheckFileExists)
{
pbStudent.ImageLocation = ofd.FileName;
string path = ofd.SafeFileName;
System.IO.File.Copy(ofd.FileName, "/Resources/SImages/" + lblRNo + ".jpg");
}
}
Can some one help me resolve issue with this error message:
the given path's format is not supported.