sarika sarikaa

sarika sarikaa

  • 1.8k
  • 60
  • 2.1k

save file from openFileDialog to project folder

Apr 24 2018 5:17 AM
save file from openFileDialog to project folder and path in database
 
I have Tried This: But Cant Save file in project Folder.
  
private void button6_Click(object sender, EventArgs e)
{
DialogResult result = openFileDialog1.ShowDialog();
if (result == DialogResult.OK)
{
String file = openFileDialog1.FileName;
string[] f = file.Split('\\');
string fn = f[(f.Length) - 1];
string dest = @"C:\Users\admin\source\repos\Software of TE\Software of TE\Images\";
File.Copy(file, dest);
}}

Answers (3)