Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

239
Vistas
Can't load Esri or JavaScript after registering .ascx file in Web Forms

Then I have an ASP.NET Web Form page that is MyAddress.ASCX that shows my map:

<asp:Panel runat="server" ID="plnAddress" Visible="true">
    <div>
        <div id="search"></div>
        <div id="map">
        </div>
    </div>
</asp.Panel>

On initial page load I am referencing MyAddress.ASCX in on page load and all works well.

Then I click on a tab to check the same map on another location in the page and it loads that page but no map shows.

I tried to remove the first instance of map created and tried to only load it on the PostBack ( thinking am using ID) but it seems it only works when page is loaded initially and not after any postbacks are made.

Initially MyAddress.ascx is registered inside IndividualAddress.ASCX like so:

<%@ Register Src="../MyAddress.ascx" TagName="MyAddress" TagPrefix="uc1" %>

<uc1:MyAddress ID="myAddress" runat="server" ShowAdditionalDirections="True" DisplayAdditionalDirectionsTextArea="True" MaxAdditionalDirectionLength="255" ShowApn="True" ShowCountry="True" ShowExtendedFields="True" ShowLocationType="True"/>

and then IndividualAddress.ascx is registered inside IndividualInfo.ASCX it like so:

<%@ Register Src="IndividualAddress.ascx" TagName="IndividualAddress" TagPrefix="uc5" %>

<uc5:SubjectAddress ID="indivAddress" runat="server" Visible="true" />

I have tried to register the JavaScript on page load of IndividualAddress, and IndividualInfo but the javascript never triggers again.

  var key1 = Guid.NewGuid();
  var key2 = Guid.NewGuid();
  ScriptManager.RegisterClientScriptInclude(myAddress, ucAddress.GetType(), key1.ToString(), "/ArcGISinit.js");
  ScriptManager.RegisterClientScriptInclude(myAddress, ucAddress.GetType(), key2.ToString(), "/myEsriJavascript.js");

I also tried to register indivAddress didn't work.

I tried many ways to register it but the JavaScript file did not fire.

I was at one time able to load the script it shows in developer tool but it appears to run after the page is rendered so the script does not fire.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda