Before I explain my situation, please have a look at the very important notice!!
1.My javascript is not embedded in .aspx file, so something like
var strMessage = '<%= str%>';
StartGeocoding(strMessage);
is not working (I tried a lot, but if you can improve it please let me know)
2.Also, I already used
Page.ClientScript.RegisterStartupScript( , , , )
function, so I think I am not allowed to use twice.
================================================================
So, here In "Location.js" (seperated from .aspx)
function LoadMap(count) {
var asdf = (something variable from code-behind);
var counts = count;
myMap = new VEMap("mapDiv");
myMap.LoadMap();
StartGeocoding(asdf); // it will show the map with location info of "asdf"
}
In code behind, there is something
public string blahblah = "1 Yonge Street"
Basically, I will get the address from code behind, and I will show it using javascript. If you (my LORD!) can teach me how to get the variable in C# from javascript, that would be very appreciated!!!
If you guys wanna challenge, here is bonus(?) question
actually, I will show the multiple location in a map. Therefore, instead of having one string "blahblah", I might have a list of string
<list>Locationlist //not array
So, 'count' in LoadMap() function will recognize how many entries I have. How to get each location information from javascript? is this possible? Any idea?