Hi csmenaria,
Check this example. Now please take its reference and correct your code.
HTML
Latitude:
<asp:TextBox ID="txtLatitude" runat="server" Text="18.92488028662047" />
Latitude:
<asp:TextBox ID="txtLongitude" runat="server" Text="72.8232192993164" />
<input type="button" value="Get Address" onclick="GetAddress()" />
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?libraries=places&sensor=false&key=APIKey"></script>
<script type="text/javascript">
function GetAddress() {
var lat = parseFloat(document.getElementById("<%=txtLatitude.ClientID%>").value);
var lng = parseFloat(document.getElementById("<%=txtLongitude.ClientID%>").value);
var latlng = new google.maps.LatLng(lat, lng);
var geocoder = geocoder = new google.maps.Geocoder();
geocoder.geocode({ 'latLng': latlng }, function (results, status) {
if (status == google.maps.GeocoderStatus.OK) {
if (results[1]) {
alert("Location: " + results[1].formatted_address);
}
}
});
}
</script>
Screenshot
