Virtual Earth in a user control

Discussion in '.NET' started by philmarsd, Aug 18, 2006.

  1. philmarsd

    philmarsd

    Joined:
    Aug 18, 2006
    Messages:
    2
    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: Aug 19, 2006
    philmarsd, Aug 18, 2006
    #1
    1. Advertising

  2. philmarsd

    philmarsd

    Joined:
    Aug 18, 2006
    Messages:
    2
    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
     
    philmarsd, Aug 20, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Morgan

    Accessing MS Virtual Earth using ASP.Net

    John Morgan, Jan 11, 2007, in forum: ASP .Net
    Replies:
    4
    Views:
    371
    John Morgan
    Jan 12, 2007
  2. matthewtpowers

    Virtual Earth in AJAX Control Toolkit TabPanel

    matthewtpowers, Feb 10, 2008, in forum: ASP .Net
    Replies:
    0
    Views:
    475
    matthewtpowers
    Feb 10, 2008
  3. Martin

    Ajax UpdatePanel and Virtual Earth

    Martin, Feb 12, 2008, in forum: ASP .Net
    Replies:
    3
    Views:
    1,236
    George Ter-Saakov
    Feb 12, 2008
  4. Martin

    Virtual Earth in Iframe

    Martin, Feb 12, 2008, in forum: ASP .Net
    Replies:
    2
    Views:
    440
    Martin
    Feb 12, 2008
  5. Ken Fine
    Replies:
    1
    Views:
    564
    Steven Cheng
    Sep 17, 2008
Loading...

Share This Page