private void button6_Click(object sender, EventArgs e) { string street = txtstreet.Text; string city = txtcity.Text; string state = txtstate.Text; string zip = txtzip.Text; try { StringBuilder queryaddress = new StringBuilder(); queryaddress.Append("https://maps.google.com.au/maps?q="); if(street != string.Empty) { queryaddress.Append(street+",+"); } if (city != string.Empty) { queryaddress.Append(city+",+"); } if (state != string.Empty) { queryaddress.Append(state+",+"); } if (zip != string.Empty) { queryaddress.Append(zip+",+"); } webBrowser1.Navigate(queryaddress.ToString()); } catch(Exception ex) { MessageBox.Show(ex.Message.ToString(), "Error"); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)