C# .NET - retrive dynamic longitude and latitude from database on html page C#

Asked By khushi on 21-Feb-14 02:28 AM
Hello,

This is the code i got by googling but i am not able to get how to bring data from database instead of static latitude and longitude.Please answer its urgent.``
    function initialize() {
  var myLatlng = new google.maps.LatLng(40.713956,-74.006653);

  var myOptions = {
   zoom: 8,
   center: myLatlng,
   mapTypeId: google.maps.MapTypeId.ROADMAP
   }   map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); var marker = new google.maps.Marker({
  draggable: true,
  position: myLatlng,
  map: map,
  title: "Your location"
  }); google.maps.event.addListener(marker,'click',function(overlay,point){
   document.getElementById("latbox").value = lat();
   document.getElementById("lngbox").value = lng();
   });
}"
instead of this ``var myLatlng = new google.maps.LatLng(40.713956,-74.006653);
i want dynamic data.
Thank you,
Khushi
Robbe Morris replied to khushi on 21-Feb-14 07:49 AM
asp.net page methods and JSON is probably and good place to start.

https://www.nullskull.com/articlelist.aspx?topicid=17
khushi replied to Robbe Morris on 28-Feb-14 08:35 AM
Hello sir,

I tried through json bt as m beginner for this can you give me whole code what i have to write for getting data from database.