Reputation: 21
In my a c# program, I want to load a google map which is a html file stored in my local disk but it failed.It says that the application have something wrong with internet connection. Here is my screenshot and some code
private void 加载地图ToolStripMenuItem_Click(object sender, EventArgs e)
{
//webBrowser1.Navigate("D:/GoogleMap/GoogleMap.html");
webBrowser1.Navigate("D:/exercise/源代码/windows监控端/TestGoogleMapGps/TestGoogleMapGps/GoogleMap.html");
}
Upvotes: 0
Views: 116
Reputation: 15754
Well normally your local machine uses the backslash, not the forward slash, so try:
webBrowser1.Navigate(@"D:\GoogleMap\GoogleMap.html");
webBrowser1.Navigate(@"D:\exercise\源代码\windows监控端\TestGoogleMapGps\TestGoogleMapGps\GoogleMap.html");
Although, I'm not entirely sure that's the solution you're going for.
Upvotes: 1