Hello everyone. I am trying to create a form with webbrowser control. I am trying to open a local html file in the webbrowser control. I have the html file in Help_Print folder, so I am using the code below to specify the Url of the webbrowser.
wbPrint.Url = new Uri("file:///" + Application.StartupPath + "\\Help_Print\\help.html");
When the form shows the webbrowser control has an error "This program cannot display the webpage". I have checked the file and folder location.
But when I try this:
wbPrint.Url = new Uri("file:///" + Application.StartupPath + "/help.html");
after copying the html file to the application startup location it works properly.
Can anyone please explain why is this happening, as I want to keep all html file in a separate folder.