Download Project: GoogleMap.zip
1. Fist take control as shown in image textbox, button, web browser…
2. Now generate the click event of the button an write code:
string strstate = txtState.Text;
string strpin = txtPinCode.Text;
string strcity = txtCity.Text;
string strstreet = txtStreet.Text;
StringBuilder objstrbud = new StringBuilder();
objstrbud.Append("http://maps.google.com/maps?q=");
if (strstate!="")
{
objstrbud.Append(strstate + "," + "+");
}
if (strcity != "")
{
objstrbud.Append(strcity + "," + "+");
}
if (strpin != "")
{
objstrbud.Append(strpin + "," + "+");
}
if (strstreet != "")
{
objstrbud.Append(strstreet + "," + "+");
}
webBrowser1.Navigate(objstrbud.ToString());
See Also :
- What is Class and Object in C#.net ?
- What is Encapsulation in C#.Net ?
- What is Abstract Class in C#.Net,How to use Abstract class in .net?
- Wht is Inheritance in c#.net ?
- What is Method Overloading in .Net?
--
/\/ir@\/ <(.'.)>
0 comments:
Post a Comment
Thanks for comment