Hi there,

I have a question regarding file open in C# , I have the path of the file saved in the database, what I want is when I open the open dialog button it will show the files in the path that I have saved and when the use click on the file the file should be opened in the relevant software,
How can I do this..

thanxxxxxxxx

Recommended Answers

All 2 Replies

Firstly, please look at the properties that are available on the OpenFileDialog.
There are some there that will answer your first question.
When the dialog closes with DialogResult.OK then you get the selected file from the FileName property.
To run the associated program, just execute the file in a new process.

System.Diagnostics.Process.Start(@"C:\WINDOWS\Web\Wallpaper\Tulips.jpg");

Firstly, please look at the properties that are available on the OpenFileDialog.
There are some there that will answer your first question.
When the dialog closes with DialogResult.OK then you get the selected file from the FileName property.
To run the associated program, just execute the file in a new process.

System.Diagnostics.Process.Start(@"C:\WINDOWS\Web\Wallpaper\Tulips.jpg");

hey thanxxx

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.