0

just like the Question title, i need add markers on my Google Map Canvas using AJAX but calling methods on ASP.net server side.

i tried with update panels , and calling javascript functions on server side using ScriptManager.RegisterClientScriptBlock, but it didn't work.

(even when I put the map in a container of updatepanel, it disappeared and did not return to show pictures)

i'd like to create a custom asp user control which can make those asyncronic calls and handle map events on server side.

How I can deal with this problem? There are many solutions that confuses me and I do not know where to start

Migue
  • 91
  • 1
  • 2
  • 11
  • Async operations kill the google map control; you have to reinitialize it on async postback end, or move it out of the update panel entirely. I would highly recommend using a client-side approach instead. – Brian Mains Nov 12 '14 at 12:42

1 Answers1

0

first of all keep your map out of update panel.. Write your javasript function to plot marker on your asp page and then you could call the javascript methods from your cs file as follows..

ScriptManager.RegisterStartupScript(this.nameOfUpdatePanel, typeof(string), "anyUniqueName", "javascriptFunction()", true);
Atul
  • 11
  • 1