webbrowser怎么打开程序根目录下的网页(本地网页)
用webBrowser1.Navigate("HTML/main.html");不行。。急。。!
[解决办法]
webBrowser1.Navigate(AppDomain.CurrentDomain.BaseDirectory+"/HTML/1.html");
[解决办法]
试试:
string url = AppDomain.CurrentDomain.BaseDirectory + "/1.html";
url=url.Replace("%20", " ");
webBrowser1.Navigate(url);