Integrating dotnetnuke with virtual earth continues to be an exciting ride. Javascript is another piece of the puzzle to add to the mix.
Today's adventure has been looking to load a bunch of stored information onto the map. The Virtual Earth API is in javascript, so how to get that information from a DNN datastore into a javascipt module to call the VE API ?
RegisterStartupScript to the rescue! This handy function documented in the .net framework allows javascript code blocks to be added to the end of your generated html for an aspx page.
So, we have some server side controls that pulls the data from a DNN DAL, generates the JS dynamically and RegisterStartupScript inserts into the page. The code generated is actually a function that is called on the JS onepageload.
One more piece of the puzzle down!