How to return the full path to SaveFileDialog?

How to get the full path string from SaveFileDialog? SaveFileDialog.FileName gives me only the file name with the extension. I looked at SaveFileDialog on MSDN , but I do not see any properties.

I need to return "C: \ Folder1 \ subFolder2 \ File004.sdf" not only "File004.sf"

+8
c # wpf
source share
4 answers

"Gets or sets a string containing the full path to the file selected in the file dialog box." this is what your MSDN article says about the FileName attribute. In addition, FileName always gave me the full path to the file.

+13
source share

What I basically do, more or less

 SaveFileDialog x = new SaveFileDialog(); if (x.ShowDialog() == DialogResult.OK) { //Use here x.FileName } 

and he always returned the full path. Are you sure you don't see the absolute path?

+8
source share

I think you can use the wrong dll - win32 instead of WinForms . Today is the same problem.

+2
source share

You should catch it after clicking "Ok", and not earlier.

-one
source share

All Articles