Virtual Earth in a user control

Joined
Aug 18, 2006
Messages
2
Reaction score
0
I have an issue with Virtual Earth.
I put the following code in the user control page load and get part of a map, then the page hangs with 'Internet Explorer cannot open the internet site. Operation Aborted.' Help!

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim MapString As String = "<script>var map = null; function GetMap(){ map = new VEMap('myMap'); map.LoadMap(new VELatLong(47.6, -122.33), 10 ,'h' ,false);}GetMap();</script>"
Page.RegisterStartupScript("mapstring", MapString)
End Sub

The code works fine in an aspx page
 
Last edited:
Joined
Aug 18, 2006
Messages
2
Reaction score
0
I have an issue with Virtual Earth.
I put the following code in the user control page load and get part of a map, then the page hangs with 'Internet Explorer cannot open the internet site. Operation Aborted.' Help!

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim MapString As String = "<script>var map = null; function GetMap(){ map = new VEMap('myMap'); map.LoadMap(new VELatLong(47.6, -122.33), 10 ,'h' ,false);}GetMap();</script>"
Page.RegisterStartupScript("mapstring", MapString)
End Sub

The code works fine in an aspx page
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top