Error 1 The best overloaded method match for 'System.Windows.Forms.WebBrowser.Navigate(System.Uri)' has some invalid arguments C:\Documents and Settings\User\Desktop\project\Tracking\Tracking\Form1.cs 322 17 Tracking Error 2 Argument '1': cannot convert from 'string' to 'System.Uri' C:\Documents and Settings\User\Desktop\project\Tracking\Tracking\Form1.cs 322 38 Tracking
private void getmap_Click(object sender, EventArgs e) { webBrowser1.Show(); if (currentLatitudeTbx.Text == string.Empty || currentLongitudeTbx.Text == string.Empty) { MessageBox.Show("Supply a latitude and longitude value", "Missing Data"); return; } try { string lat = string.Empty; string lon = string.Empty; StringBuilder queryAddress = new StringBuilder(); queryAddress.Append("http://maps.google.com/maps?q="); if (currentLatitudeTbx.Text != string.Empty) { lat = currentLatitudeTbx.Text; queryAddress.Append(lat + "%2C"); } if (currentLongitudeTbx.Text != string.Empty) { lon = currentLongitudeTbx.Text; queryAddress.Append(lon); } webBrowser1.Navigate(queryAddress.ToString()); } catch (Exception ex) { MessageBox.Show(ex.Message.ToString(), "Error"); } }
webBrowser1.Navigate(new Uri(queryAddress.ToString()));
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)