0

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

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by judithSampathwa
0

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");
0

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

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.