Hi,
This has been doing my head in for a while. I have created a module which uses Virtual Earth. The problem I have is ASP.NET uses postbacks to the server. I am reasonably new to DNN and ASP.Net so please be patient.
If I have JS Functions sat on the VE.ASCX page, how do I access them from the VE.ASCX.vb (CodeFile) . I've tried "GetMap();") , this is an OnLoad handler and places the initial pushpins on the map OK.
DotNetNuke.UI.Utilities.DNNClientAPI.AddBodyOnloadEventHandler(Page,
What I want to do now is remove the current pushpins in favour of newly updated pushpins. What I have is a TreeView of vehicles and when a vehicle is selected the VehicleID is known (say 34) and the Longs and Lats are taken from a database for that VehicleID. This is where I become stuck. From the TreeView click, I need a postback to get current vehicle positions and to remove current pushpins in favour of new ones.
If the treeview click returns a value of 34 and I then query a database looking the most recent position, how do I do the following:
- ReLoad/clear the map from the JS on the ASCX page (AJAX not installed)
- Delete current pushpins
- Add new pushpins from the SQL Results?
I can do everything apart from the Virtual Earth map updates. All the functions work if used with a <input button> and an OnClick.
Basically......How on earth to I access a JS Function from a ASCX.vb code file?
Alex