Question

I've an html page index.html in my windows application folder. Now I want to set it as a url of webbrowser in form1. How can I do it? Is there any syntax like server.mappath() in web applications in windows?

Example:

Uri repuri = new Uri("index.html");
webBrowser1.Url = repuri;

How can I map it?

Was it helpful?

Solution

Application.ExecutablePath

Returns the full path of your exe-file, including the filename itself. You could use that to build a path to your HMTL-file.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top