Hi,
I am trying to pass some data from server to a jQuery script with google maps code.
I tried different ways. In the first case I defined a label (lblData) in aspx and put a string into it from page.Load event in aspx.vb.
In the script I get the label content with $("#MainContent_lblData").text() and put it in a variable, so that I can use it anywhere in the script. It works, but I don't want the label content to be visible on the page, so I used the label's property
"visible" to false. The drawback is that this way I cannot see the label's content in the script either.
The second way, I defined a public function (getData()) in aspx.vb that returns a string. In the script I defined a variable and assigned it the return value of the function like
var info = '<%=getData() %>'. When I use the variable, it's content is a string like '<%=getData() %>' and not the return value of the function. So it is not working.
I am trying this simple test, but actually I want to pass an array of coordinates, stored in SQL Server, to create markers in a google map.
Is there a simple way to do it without using web methods, web services, WCF or other complex procedures?
Thanks