Search code examples
c#filebrowserfile-association

C# - Associate a file type and open it within WebBrowser control?


How would I be able to open a file (lets say an .html file) and load it into the WebBrowser control on my WinForm application? I'm talking about right clicking on the file and choosing to open it with my application. Any ideas?


Solution

  • You can pass it as command line parameter. Than in your application you should analyze command line parameters and load file into WebBrowser.