Link to home
Start Free TrialLog in
Avatar of K Feening
K FeeningFlag for Australia

asked on

VB.Net SaveFileDialog

In VB.Net 2008

Using SavefileDialog as you select the Directory and folder can you show the path in the file name: text
if so how

Thanks
Avatar of Miguel Oz
Miguel Oz
Flag of Australia image

Could you clarify your question?
The property Filename contains both the  file path and extension.
e.g. A filename value could be:
c:\temp\myfilename.txt
if you need only the file name not the path use Path.GetFilename method:
Path.GetFilename("c:\temp\myfilename.txt")
This method returns myfilename.txt

For other path methods and code samples on how to extract only parts of your file path, check:
http://www.dotnetperls.com/path-vbnet
You cannot (easily) change the behaviour of built in dialog boxes and as far as I know, there isn't an option to enable this behaviour.
Avatar of K Feening

ASKER

The property filename is empty
I want when the user clicks on the directory etc it to populate the savefileDialog.filename
ASKER CERTIFIED SOLUTION
Avatar of Miguel Oz
Miguel Oz
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial