Hi Mayank,
Use CheckFileExists =false; and set file name to open file dialog as:
private void btnChangeDestinationPath_Click(object sender, RoutedEventArgs e)
{
int Uploadedfilecount = 0;
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.Multiselect =false;
openFileDialog.CheckFileExists =false;
openFileDialog.Filter ="pdf files (*.pdf)|*.pdf|All files (*.*)|*.*";
openFileDialog.InitialDirectory = System.IO.Path.GetDirectoryName(txtdestinationPath.Text);
openFileDialog.FileName = System.IO.Path.GetFileName(txtdestinationPath.Text);
if (openFileDialog.ShowDialog() == true)
{
foreach (string filename in openFileDialog.FileNames)
{
Uploadedfilecount += 1;
txtdestinationPath.Text = System.IO.Path.GetFullPath(filename);
ConfigurationSettings.AppSettings.Set("MergeDestinationPath", System.IO.Path.GetFullPath(filename));
}
}
}
Posted On:
01-Jan-2016 04:19