I have a property like this:
public float Lat{
get {
float lat;
if (!float.TryParse(hdnLat.Value, out lat))
{
throw new NotImplementedException();
}
return lat;
}
set {
hdnLat.Value = value; // Line 43
}
}
I got Latitude and Longitude from Google Maps and i get the cordinates from two asp.net hiddenfields.
<asp:HiddenField ID="hdnLat" runat="server" />
<asp:HiddenField ID="hdnLng" runat="server" />
I store my latitude and longitude as float in my databas so i have to convert it to float right?
How can i convert my cordinates to correct format?
Visual Studio givs me this error:
Can not implicitly convert type double to string Line 43
How can i solve this problem?