What I need, is to get the new created file path (i.e Same as save as dialog in windows) .
I'll Use the Open file() elsewhere. When I Use the below code, it says no file present.
FYI..
SaveFileDialog_admin.Filter = "Excel|*.Xls"
SaveFileDialog_admin.Title = "Save An Excel File"
SaveFileDialog_admin.ShowDialog()
Dim file_name = SaveFileDialog_admin.FileName
Label1.Text = Convert.ToString(file_name)
I just want to know how can I get the Newly created File Path And the file name for later use.
Any Suggestion or answer is welcomed.
Thanks in advance.
ASAP
ShankeyPosted Jan 4, 2011, 4:06 AM
I am not clear with your problem but at first sight it looks that you want to provide user with path to save a file at the same place where last file was saved. so in that case you can store following information of path for the last saved action using following commands
Path.GetDirectoryName(saveFileDialog1.FileName)
Path.GetFileName(saveFileDialog1.FileName)
Path.GetExtension(saveFileDialog1.FileName)