My applicattion is WPF: I want to open the local file help.html of my project in the default browser. I have created a button Help, in the event I want to open this .html.
I have some problems with the path... Thanks.
You can open any file with your default program using System.Diagnostics.Process.Start method.
But before you have to open your file, you must be included in the application folder for this, you can click right on the file go -> properties and the properties box, select Copy if newer on the property Copy to Output Directory.
Put the below code in your button click event:
System.Diagnostics.Process.Start("help.html");
Use below code in button_Click event
System.Diagnostics.Process.Start("your HTML File Path");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With