hey ,
I have browsed a file using openfiledialog control,
the code is as below:
private void btnBrowse_Click(object sender, EventArgs e)
{
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
txtFile.Text = openFileDialog1.FileName;
//File Selected is shown in textbox
}
}
Now I have another button submit
private void btnSubmit_Click(object sender, EventArgs e)
{
if(openFileDialog1.CheckFileExists)
{
//string SelectedFile = openFileDialog1.FileName;
Stream str = openFileDialog1.OpenFile();
StreamReader Sr = new StreamReader(str);
string fileName = "C:\Users\Anisha\Desktop\folder\INPUT.txt";
string dirName = Path.GetDirectoryName(fileName);
}
I want to move the browsed file to the above path ?
How could i do that.. please help... urgent !!