Autocomplete Google Place API

  1. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="AutoCompleteAPI.aspx.cs" Inherits="AutoCompleteAPI" %>  
  2.   
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
  4.   
  5. <html xmlns="http://www.w3.org/1999/xhtml">  
  6. <head runat="server">  
  7.  <title>Place Autocomplete Address Form</title>  
  8.     <meta name="viewport" content="initial-scale=1.0, user-scalable=no">  
  9.     <meta charset="utf-8">  
  10.     <link type="text/css" rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500">  
  11.     <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=places"></script>  
  12.     <script type="text/javascript">  
  13.         // This example displays an address form, using the autocomplete feature  
  14.         // of the Google Places API to help users fill in the information.  
  15.   
  16.         var placeSearch, autocomplete,country;  
  17.         var componentForm = {  
  18.             street_number: 'short_name',  
  19.             route: 'long_name',  
  20.             locality: 'long_name',  
  21.             administrative_area_level_1: 'short_name',  
  22.             country: 'long_name',  
  23.         };  
  24.         function changecountry() {  
  25.             country = document.getElementById('ddlcountry').value;  
  26.             if (country == 'all') {  
  27.                 autocomplete.setComponentRestrictions([]);  
  28.                   
  29.             } else {  
  30.                 autocomplete.setComponentRestrictions({ 'country': country });  
  31.             }  
  32.         }  
  33.   
  34.         function initialize() {  
  35.             // Create the autocomplete object, restricting the search  
  36.             // to geographical location types.  
  37.   
  38.             autocomplete = new google.maps.places.Autocomplete(  
  39.             /** @type {HTMLInputElement} */(document.getElementById('txtplace')),  
  40.       { types: ['(cities)'] });  
  41.       changecountry();  
  42.             // Set the country restriction based on user input.  
  43.               
  44.             // When the user selects an address from the dropdown,  
  45.             // populate the address fields in the form.  
  46.             google.maps.event.addListener(autocomplete, 'place_changed', function () {  
  47.           fillInAddress();  
  48.             
  49.       });  
  50.   }  
  51.         // The START and END in square brackets define a snippet for our documentation:  
  52.         // [START region_fillform]  
  53.         function fillInAddress() {  
  54.             // Get the place details from the autocomplete object.  
  55.             var place = autocomplete.getPlace();  
  56.             // Get each component of the address from the place details  
  57.             // and fill the corresponding field on the form.  
  58.             for (var i = 0; i < place.address_components.length; i++) {  
  59.                 var addressType = place.address_components[i].types[0];  
  60.                 if (componentForm[addressType]) {  
  61.                     if (addressType == "locality") {  
  62.                         var val = place.address_components[i][componentForm[addressType]];  
  63.                         document.getElementById('txtlocality').value = val;  
  64.                     }  
  65.                     else if (addressType == "administrative_area_level_1") {  
  66.                         document.getElementById('txtState').value = place.address_components[i][componentForm[addressType]];  
  67.                     }  
  68.                     else if (addressType == "country") {  
  69.                         var val = place.address_components[i][componentForm[addressType]];  
  70.                         document.getElementById('txtCountry').value = val;  
  71.                     }  
  72.                 }  
  73.             }  
  74.             geolocate();  
  75.         }  
  76.         // [END region_fillform]  
  77.   
  78.         // [START region_geolocation]  
  79.         // Bias the autocomplete object to the user's geographical location,  
  80.         // as supplied by the browser's 'navigator.geolocation' object.  
  81.         function geolocate() {  
  82.           
  83.             var place = autocomplete.getPlace();  
  84.             //-----For Latitude  
  85.             var lat = place.geometry.location.lat();  
  86.             var Latsign = '';  
  87.              var latitudeString;  
  88.              var myLati = parseFloat(lat);  
  89.              if (myLati >= 0) {  
  90.                  Latsign = "N";  
  91.              }  
  92.              else {  
  93.                  myLati = -myLati;  
  94.                  Latsign = "S";  
  95.              }  
  96.              latitudeString = convertDecimalToDeg(myLati);  
  97.               document.getElementById('txtlatitude').value = latitudeString+Latsign;  
  98.             //----For Longitude  
  99.             var lang = place.geometry.location.lng();  
  100.              var sign1 = '';  
  101.              var longitudeString;  
  102.              var myLangi = parseFloat(lang);  
  103.              if (myLangi >= 0) {  
  104.                  sign1 = "E";  
  105.              }  
  106.              else {  
  107.                  myLangi = -myLangi;  
  108.                  sign1 = "W";  
  109.              }  
  110.              longitudeString = convertDecimalToDeg(myLangi);  
  111.             document.getElementById('txtlongitude').value =longitudeString+sign1;  
  112.         }  
  113.         function convertDecimalToDeg(input) {  
  114.              var myVar = parseFloat(input);  
  115.              var myString = '';  
  116.              var myvar1 = parseInt(myVar);  
  117.              myVar = (myVar - myvar1) * 60;  
  118.              var myVar2 = parseInt(myVar);  
  119.              myVar = (myVar - myVar2) * 60;  
  120.              var myVar3 = parseInt(myVar);  
  121.              myString = myVar3;  
  122.              if (myVar3 < 10) {  
  123.                  myString = "0" + myString;  
  124.              }  
  125.              myString = myVar2 + ":" + myString;  
  126.              if (myVar2 < 10) {  
  127.                  myString = "0" + myString;  
  128.              }  
  129.              myString = myvar1 + ":" + myString;  
  130.              if (myvar1 < 10) {  
  131.                  myString = "00" + myString;  
  132.              }  
  133.              else if (myvar1 < 100) {  
  134.                  myString = "0" + myString;  
  135.              }  
  136.              return myString;  
  137.          }  
  138.         // [END region_geolocation]  
  139.     </script>  
  140.       
  141. </head>  
  142. <body onload="initialize();">  
  143.     <form id="form1" runat="server">  
  144.     <center>      
  145.         <table border="1">  
  146.         <tr><td colspan="2"><h4 style="text-align:center">Find City, Sate, Latitude, Longitude </h4></td></tr>  
  147.             <tr>  
  148.                 <td>  
  149.                     Country  
  150.                 </td>  
  151.                 <td>  
  152.                     <asp:DropDownList ID="ddlcountry" runat="server" onchange="changecountry()"  
  153.                         CssClass="activSelect" TabIndex="11">  
  154.                         <asp:ListItem Text="Select Country" Value="Select Country"></asp:ListItem>  
  155.                         <asp:ListItem Text="Afghanistan" Value="AF" />  
  156.                         <asp:ListItem Text="Åland Islands" Value="AX" />  
  157.                         <asp:ListItem Text="Albania" Value="AL" />  
  158.                         <asp:ListItem Text="Algeria" Value="DZ" />  
  159.                         <asp:ListItem Text="American Samoa" Value="AS" />  
  160.                         <asp:ListItem Text="Andorra" Value="AD" />  
  161.                         <asp:ListItem Text="Angola" Value="AO" />  
  162.                         <asp:ListItem Text="Anguilla" Value="AI" />  
  163.                         <asp:ListItem Text="Antarctica" Value="AQ" />  
  164.                         <asp:ListItem Text="Antigua and Barbuda" Value="AG" />  
  165.                         <asp:ListItem Text="Argentina" Value="AR" />  
  166.                         <asp:ListItem Text="Armenia" Value="AM" />  
  167.                         <asp:ListItem Text="Aruba" Value="AW" />  
  168.                         <asp:ListItem Text="Australia" Value="AU" />  
  169.                         <asp:ListItem Text="Austria" Value="AT" />  
  170.                         <asp:ListItem Text="Azerbaijan" Value="AZ" />  
  171.                         <asp:ListItem Text="Bahamas" Value="BS" />  
  172.                         <asp:ListItem Text="Bahrain" Value="BH" />  
  173.                         <asp:ListItem Text="Bangladesh" Value="BD" />  
  174.                         <asp:ListItem Text="Barbados" Value="BB" />  
  175.                         <asp:ListItem Text="Belarus" Value="BY" />  
  176.                         <asp:ListItem Text="Belgium" Value="BE" />  
  177.                         <asp:ListItem Text="Belize" Value="BZ" />  
  178.                         <asp:ListItem Text="Benin" Value="BJ" />  
  179.                         <asp:ListItem Text="Bermuda" Value="BM" />  
  180.                         <asp:ListItem Text="Bhutan" Value="BT" />  
  181.                         <asp:ListItem Text="Bolivia, Plurinational State of" Value="BO" />  
  182.                         <asp:ListItem Text="Bonaire, Sint Eustatius and Saba" Value="BQ" />  
  183.                         <asp:ListItem Text="Bosnia and Herzegovina" Value="BA" />  
  184.                         <asp:ListItem Text="Botswana" Value="BW" />  
  185.                         <asp:ListItem Text="Bouvet Island" Value="BV" />  
  186.                         <asp:ListItem Text="Brazil" Value="BR" />  
  187.                         <asp:ListItem Text="British Indian Ocean Territory" Value="IO" />  
  188.                         <asp:ListItem Text="Brunei Darussalam" Value="BN" />  
  189.                         <asp:ListItem Text="Bulgaria" Value="BG" />  
  190.                         <asp:ListItem Text="Burkina Faso" Value="BF" />  
  191.                         <asp:ListItem Text="Burundi" Value="BI" />  
  192.                         <asp:ListItem Text="Cambodia" Value="KH" />  
  193.                         <asp:ListItem Text="Cameroon" Value="CM" />  
  194.                         <asp:ListItem Text="Canada" Value="CA" />  
  195.                         <asp:ListItem Text="Cape Verde" Value="CV" />  
  196.                         <asp:ListItem Text="Cayman Islands" Value="KY" />  
  197.                         <asp:ListItem Text="Central African Republic" Value="CF" />  
  198.                         <asp:ListItem Text="Chad" Value="TD" />  
  199.                         <asp:ListItem Text="Chile" Value="CL" />  
  200.                         <asp:ListItem Text="China" Value="CN" />  
  201.                         <asp:ListItem Text="Christmas Island" Value="CX" />  
  202.                         <asp:ListItem Text="Cocos (Keeling) Islands" Value="CC" />  
  203.                         <asp:ListItem Text="Colombia" Value="CO" />  
  204.                         <asp:ListItem Text="Comoros" Value="KM" />  
  205.                         <asp:ListItem Text="Congo" Value="CG" />  
  206.                         <asp:ListItem Text="Congo, the Democratic Republic of the" Value="CD" />  
  207.                         <asp:ListItem Text="Cook Islands" Value="CK" />  
  208.                         <asp:ListItem Text="Costa Rica" Value="CR" />  
  209.                         <asp:ListItem Text="Côte d'Ivoire" Value="CI" />  
  210.                         <asp:ListItem Text="Croatia" Value="HR" />  
  211.                         <asp:ListItem Text="Cuba" Value="CU" />  
  212.                         <asp:ListItem Text="Curaçao" Value="CW" />  
  213.                         <asp:ListItem Text="Cyprus" Value="CY" />  
  214.                         <asp:ListItem Text="Czech Republic" Value="CZ" />  
  215.                         <asp:ListItem Text="Denmark" Value="DK" />  
  216.                         <asp:ListItem Text="Djibouti" Value="DJ" />  
  217.                         <asp:ListItem Text="Dominica" Value="DM" />  
  218.                         <asp:ListItem Text="Dominican Republic" Value="DO" />  
  219.                         <asp:ListItem Text="Ecuador" Value="EC" />  
  220.                         <asp:ListItem Text="Egypt" Value="EG" />  
  221.                         <asp:ListItem Text="El Salvador" Value="SV" />  
  222.                         <asp:ListItem Text="Equatorial Guinea" Value="GQ" />  
  223.                         <asp:ListItem Text="Eritrea" Value="ER" />  
  224.                         <asp:ListItem Text="Estonia" Value="EE" />  
  225.                         <asp:ListItem Text="Ethiopia" Value="ET" />  
  226.                         <asp:ListItem Text="Falkland Islands (Malvinas)" Value="FK" />  
  227.                         <asp:ListItem Text="Faroe Islands" Value="FO" />  
  228.                         <asp:ListItem Text="Fiji" Value="FJ" />  
  229.                         <asp:ListItem Text="Finland" Value="FI" />  
  230.                         <asp:ListItem Text="France" Value="FR" />  
  231.                         <asp:ListItem Text="French Guiana" Value="GF" />  
  232.                         <asp:ListItem Text="French Polynesia" Value="PF" />  
  233.                         <asp:ListItem Text="French Southern Territories" Value="TF" />  
  234.                         <asp:ListItem Text="Gabon" Value="GA" />  
  235.                         <asp:ListItem Text="Gambia" Value="GM" />  
  236.                         <asp:ListItem Text="Georgia" Value="GE" />  
  237.                         <asp:ListItem Text="Germany" Value="DE" />  
  238.                         <asp:ListItem Text="Ghana" Value="GH" />  
  239.                         <asp:ListItem Text="Gibraltar" Value="GI" />  
  240.                         <asp:ListItem Text="Greece" Value="GR" />  
  241.                         <asp:ListItem Text="Greenland" Value="GL" />  
  242.                         <asp:ListItem Text="Grenada" Value="GD" />  
  243.                         <asp:ListItem Text="Guadeloupe" Value="GP" />  
  244.                         <asp:ListItem Text="Guam" Value="GU" />  
  245.                         <asp:ListItem Text="Guatemala" Value="GT" />  
  246.                         <asp:ListItem Text="Guernsey" Value="GG" />  
  247.                         <asp:ListItem Text="Guinea" Value="GN" />  
  248.                         <asp:ListItem Text="Guinea-Bissau" Value="GW" />  
  249.                         <asp:ListItem Text="Guyana" Value="GY" />  
  250.                         <asp:ListItem Text="Haiti" Value="HT" />  
  251.                         <asp:ListItem Text="Heard Island and McDonald Islands" Value="HM" />  
  252.                         <asp:ListItem Text="Holy See (Vatican City State)" Value="VA" />  
  253.                         <asp:ListItem Text="Honduras" Value="HN" />  
  254.                         <asp:ListItem Text="Hong Kong" Value="HK" />  
  255.                         <asp:ListItem Text="Hungary" Value="HU" />  
  256.                         <asp:ListItem Text="Iceland" Value="IS" />  
  257.                         <asp:ListItem Text="India" Value="IN" Selected="True" />  
  258.                         <asp:ListItem Text="Indonesia" Value="ID" />  
  259.                         <asp:ListItem Text="Iran, Islamic Republic of" Value="IR" />  
  260.                         <asp:ListItem Text="Iraq" Value="IQ" />  
  261.                         <asp:ListItem Text="Ireland" Value="IE" />  
  262.                         <asp:ListItem Text="Isle of Man" Value="IM" />  
  263.                         <asp:ListItem Text="Israel" Value="IL" />  
  264.                         <asp:ListItem Text="Italy" Value="IT" />  
  265.                         <asp:ListItem Text="Jamaica" Value="JM" />  
  266.                         <asp:ListItem Text="Japan" Value="JP" />  
  267.                         <asp:ListItem Text="Jersey" Value="JE" />  
  268.                         <asp:ListItem Text="Jordan" Value="JO" />  
  269.                         <asp:ListItem Text="Kazakhstan" Value="KZ" />  
  270.                         <asp:ListItem Text="Kenya" Value="KE" />  
  271.                         <asp:ListItem Text="Kiribati" Value="KI" />  
  272.                         <asp:ListItem Text="Korea, Democratic People's Republic of" Value="KP" />  
  273.                         <asp:ListItem Text="Korea, Republic of" Value="KR" />  
  274.                         <asp:ListItem Text="Kuwait" Value="KW" />  
  275.                         <asp:ListItem Text="Kyrgyzstan" Value="KG" />  
  276.                         <asp:ListItem Text="Lao People's Democratic Republic" Value="LA" />  
  277.                         <asp:ListItem Text="Latvia" Value="LV" />  
  278.                         <asp:ListItem Text="Lebanon" Value="LB" />  
  279.                         <asp:ListItem Text="Lesotho" Value="LS" />  
  280.                         <asp:ListItem Text="Liberia" Value="LR" />  
  281.                         <asp:ListItem Text="Libya" Value="LY" />  
  282.                         <asp:ListItem Text="Liechtenstein" Value="LI" />  
  283.                         <asp:ListItem Text="Lithuania" Value="LT" />  
  284.                         <asp:ListItem Text="Luxembourg" Value="LU" />  
  285.                         <asp:ListItem Text="Macao" Value="MO" />  
  286.                         <asp:ListItem Text="Macedonia, the former Yugoslav Republic of" Value="MK" />  
  287.                         <asp:ListItem Text="Madagascar" Value="MG" />  
  288.                         <asp:ListItem Text="Malawi" Value="MW" />  
  289.                         <asp:ListItem Text="Malaysia" Value="MY" />  
  290.                         <asp:ListItem Text="Maldives" Value="MV" />  
  291.                         <asp:ListItem Text="Mali" Value="ML" />  
  292.                         <asp:ListItem Text="Malta" Value="MT" />  
  293.                         <asp:ListItem Text="Marshall Islands" Value="MH" />  
  294.                         <asp:ListItem Text="Martinique" Value="MQ" />  
  295.                         <asp:ListItem Text="Mauritania" Value="MR" />  
  296.                         <asp:ListItem Text="Mauritius" Value="MU" />  
  297.                         <asp:ListItem Text="Mayotte" Value="YT" />  
  298.                         <asp:ListItem Text="Mexico" Value="MX" />  
  299.                         <asp:ListItem Text="Micronesia, Federated States of" Value="FM" />  
  300.                         <asp:ListItem Text="Moldova, Republic of" Value="MD" />  
  301.                         <asp:ListItem Text="Monaco" Value="MC" />  
  302.                         <asp:ListItem Text="Mongolia" Value="MN" />  
  303.                         <asp:ListItem Text="Montenegro" Value="ME" />  
  304.                         <asp:ListItem Text="Montserrat" Value="MS" />  
  305.                         <asp:ListItem Text="Morocco" Value="MA" />  
  306.                         <asp:ListItem Text="Mozambique" Value="MZ" />  
  307.                         <asp:ListItem Text="Myanmar" Value="MM" />  
  308.                         <asp:ListItem Text="Namibia" Value="NA" />  
  309.                         <asp:ListItem Text="Nauru" Value="NR" />  
  310.                         <asp:ListItem Text="Nepal" Value="NP" />  
  311.                         <asp:ListItem Text="Netherlands" Value="NL" />  
  312.                         <asp:ListItem Text="New Caledonia" Value="NC" />  
  313.                         <asp:ListItem Text="New Zealand" Value="NZ" />  
  314.                         <asp:ListItem Text="Nicaragua" Value="NI" />  
  315.                         <asp:ListItem Text="Niger" Value="NE" />  
  316.                         <asp:ListItem Text="Nigeria" Value="NG" />  
  317.                         <asp:ListItem Text="Niue" Value="NU" />  
  318.                         <asp:ListItem Text="Norfolk Island" Value="NF" />  
  319.                         <asp:ListItem Text="Northern Mariana Islands" Value="MP" />  
  320.                         <asp:ListItem Text="Norway" Value="NO" />  
  321.                         <asp:ListItem Text="Oman" Value="OM" />  
  322.                         <asp:ListItem Text="Pakistan" Value="PK" />  
  323.                         <asp:ListItem Text="Palau" Value="PW" />  
  324.                         <asp:ListItem Text="Palestinian Territory, Occupied" Value="PS" />  
  325.                         <asp:ListItem Text="Panama" Value="PA" />  
  326.                         <asp:ListItem Text="Papua New Guinea" Value="PG" />  
  327.                         <asp:ListItem Text="Paraguay" Value="PY" />  
  328.                         <asp:ListItem Text="Peru" Value="PE" />  
  329.                         <asp:ListItem Text="Philippines" Value="PH" />  
  330.                         <asp:ListItem Text="Pitcairn" Value="PN" />  
  331.                         <asp:ListItem Text="Poland" Value="PL" />  
  332.                         <asp:ListItem Text="Portugal" Value="PT" />  
  333.                         <asp:ListItem Text="Puerto Rico" Value="PR" />  
  334.                         <asp:ListItem Text="Qatar" Value="QA" />  
  335.                         <asp:ListItem Text="Réunion" Value="RE" />  
  336.                         <asp:ListItem Text="Romania" Value="RO" />  
  337.                         <asp:ListItem Text="Russian Federation" Value="RU" />  
  338.                         <asp:ListItem Text="Rwanda" Value="RW" />  
  339.                         <asp:ListItem Text="Saint Barthélemy" Value="BL" />  
  340.                         <asp:ListItem Text="Saint Helena, Ascension and Tristan da Cunha" Value="SH" />  
  341.                         <asp:ListItem Text="Saint Kitts and Nevis" Value="KN" />  
  342.                         <asp:ListItem Text="Saint Lucia" Value="LC" />  
  343.                         <asp:ListItem Text="Saint Martin (French part)" Value="MF" />  
  344.                         <asp:ListItem Text="Saint Pierre and Miquelon" Value="PM" />  
  345.                         <asp:ListItem Text="Saint Vincent and the Grenadines" Value="VC" />  
  346.                         <asp:ListItem Text="Samoa" Value="WS" />  
  347.                         <asp:ListItem Text="San Marino" Value="SM" />  
  348.                         <asp:ListItem Text="Sao Tome and Principe" Value="ST" />  
  349.                         <asp:ListItem Text="Saudi Arabia" Value="SA" />  
  350.                         <asp:ListItem Text="Senegal" Value="SN" />  
  351.                         <asp:ListItem Text="Serbia" Value="RS" />  
  352.                         <asp:ListItem Text="Seychelles" Value="SC" />  
  353.                         <asp:ListItem Text="Sierra Leone" Value="SL" />  
  354.                         <asp:ListItem Text="Singapore" Value="SG" />  
  355.                         <asp:ListItem Text="Sint Maarten (Dutch part)" Value="SX" />  
  356.                         <asp:ListItem Text="Slovakia" Value="SK" />  
  357.                         <asp:ListItem Text="Slovenia" Value="SI" />  
  358.                         <asp:ListItem Text="Solomon Islands" Value="SB" />  
  359.                         <asp:ListItem Text="Somalia" Value="SO" />  
  360.                         <asp:ListItem Text="South Africa" Value="ZA" />  
  361.                         <asp:ListItem Text="South Georgia and the South Sandwich Islands" Value="GS" />  
  362.                         <asp:ListItem Text="South Sudan" Value="SS" />  
  363.                         <asp:ListItem Text="Spain" Value="ES" />  
  364.                         <asp:ListItem Text="Sri Lanka" Value="LK" />  
  365.                         <asp:ListItem Text="Sudan" Value="SD" />  
  366.                         <asp:ListItem Text="Suriname" Value="SR" />  
  367.                         <asp:ListItem Text="Svalbard and Jan Mayen" Value="SJ" />  
  368.                         <asp:ListItem Text="Swaziland" Value="SZ" />  
  369.                         <asp:ListItem Text="Sweden" Value="SE" />  
  370.                         <asp:ListItem Text="Switzerland" Value="CH" />  
  371.                         <asp:ListItem Text="Syrian Arab Republic" Value="SY" />  
  372.                         <asp:ListItem Text="Taiwan, Province of China" Value="TW" />  
  373.                         <asp:ListItem Text="Tajikistan" Value="TJ" />  
  374.                         <asp:ListItem Text="Tanzania, United Republic of" Value="TZ" />  
  375.                         <asp:ListItem Text="Thailand" Value="TH" />  
  376.                         <asp:ListItem Text="Timor-Leste" Value="TL" />  
  377.                         <asp:ListItem Text="Togo" Value="TG" />  
  378.                         <asp:ListItem Text="Tokelau" Value="TK" />  
  379.                         <asp:ListItem Text="Tonga" Value="TO" />  
  380.                         <asp:ListItem Text="Trinidad and Tobago" Value="TT" />  
  381.                         <asp:ListItem Text="Tunisia" Value="TN" />  
  382.                         <asp:ListItem Text="Turkey" Value="TR" />  
  383.                         <asp:ListItem Text="Turkmenistan" Value="TM" />  
  384.                         <asp:ListItem Text="Turks and Caicos Islands" Value="TC" />  
  385.                         <asp:ListItem Text="Tuvalu" Value="TV" />  
  386.                         <asp:ListItem Text="Uganda" Value="UG" />  
  387.                         <asp:ListItem Text="Ukraine" Value="UA" />  
  388.                         <asp:ListItem Text="United Arab Emirates" Value="AE" />  
  389.                         <asp:ListItem Text="United Kingdom" Value="GB" />  
  390.                         <asp:ListItem Text="United States" Value="US" />  
  391.                         <asp:ListItem Text="United States Minor Outlying Islands" Value="UM" />  
  392.                         <asp:ListItem Text="Uruguay" Value="UY" />  
  393.                         <asp:ListItem Text="Uzbekistan" Value="UZ" />  
  394.                         <asp:ListItem Text="Vanuatu" Value="VU" />  
  395.                         <asp:ListItem Text="Venezuela, Bolivarian Republic of" Value="VE" />  
  396.                         <asp:ListItem Text="Viet Nam" Value="VN" />  
  397.                         <asp:ListItem Text="Virgin Islands, British" Value="VG" />  
  398.                         <asp:ListItem Text="Virgin Islands, U.S." Value="VI" />  
  399.                         <asp:ListItem Text="Wallis and Futuna" Value="WF" />  
  400.                         <asp:ListItem Text="Western Sahara" Value="EH" />  
  401.                         <asp:ListItem Text="Yemen" Value="YE" />  
  402.                         <asp:ListItem Text="Zambia" Value="ZM" />  
  403.                         <asp:ListItem Text="Zimbabwe" Value="ZW" />  
  404.                     </asp:DropDownList>  
  405.                 </td>  
  406.             </tr>  
  407.             <tr>  
  408.                 <td>  
  409.                     Place  
  410.                 </td>  
  411.                 <td>  
  412.                 <asp:TextBox ID="txtplace" runat="server" Placeholder="Enter your address" onchange="fillInAddress()"></asp:TextBox>  
  413.                 </td>  
  414.             </tr>  
  415.             <tr>  
  416.                 <td>  
  417.                     City  
  418.                 </td>  
  419.                 <td colspan="3">  
  420.                     <asp:TextBox ID="txtlocality" runat="server"></asp:TextBox>  
  421.                 </td>  
  422.             </tr>  
  423.             <tr>  
  424.                 <td>  
  425.                     State  
  426.                 </td>  
  427.                 <td class="slimField">  
  428.                     <asp:TextBox ID="txtState" runat="server"></asp:TextBox>  
  429.                 </td>  
  430.             </tr>  
  431.             <tr>  
  432.                 <td>  
  433.                     Country  
  434.                 </td>  
  435.                 <td colspan="3">  
  436.                     <asp:TextBox ID="txtCountry" runat="server"></asp:TextBox>  
  437.                 </td>  
  438.             </tr>  
  439.             <tr>  
  440.                 <td>  
  441.                     Latitude  
  442.                 </td>  
  443.                 <td>  
  444.                     <asp:TextBox ID="txtlatitude" runat="server"></asp:TextBox>  
  445.                 </td>  
  446.             </tr>  
  447.             <tr>  
  448.             <td>Logitude</td>  
  449.             <td>  
  450.                     <asp:TextBox ID="txtlongitude" runat="server"></asp:TextBox>  
  451.                 </td>  
  452.             </tr>  
  453.         </table>  
  454.     </div>  
  455.     </center>  
  456.     </form>  
  457. </body>  
  458. </html>